Getting Started with PowerShell

Learn the fundamentals of PowerShell to build reusable scripts and functions to automate administrative tasks with Windows

Getting Started with PowerShell

Learning
Michael Shepard

4 customer reviews
Learn the fundamentals of PowerShell to build reusable scripts and functions to automate administrative tasks with Windows
$31.99
$39.99
RRP $31.99
RRP $39.99
eBook
Print + eBook

Instantly access this course right now and get the skills you need in 2017

With unlimited access to a constantly growing library of over 4,000 eBooks and Videos, a subscription to Mapt gives you everything you need to learn new skills. Cancel anytime.

Free Sample

Book Details

ISBN 139781783558506
Paperback180 pages

Book Description

Windows PowerShell is a task-based command-line shell and scripting language designed specifically for system administration. Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows.

PowerShell is great for batch importing or deleting large sets of user accounts and will let you collect a massive amount of detailed system information in bulk via WMI (Windows Management Instrumentation).

Getting Started with PowerShell is designed to help you get up and running with PowerShell, taking you from the basics of installation, to writing scripts and web server automation. This book, as an introduction to the central topics of PowerShell, covers finding and understanding PowerShell commands and packaging code for reusability, right through to a practical example of automating IIS. It also includes topics such as installation and setup, creating scripts, automating tasks, and using Powershell to access data stores, registry, and file systems.

You will explore the PowerShell environment and discover how to use cmdlets, functions, and scripts to automate Windows systems. Along the way, you will learn to perform data manipulation and solve common problems using basic file input/output functions.

By the end of this book, you will be familiar with PowerShell and be able to utilize the lessons learned from the book to automate your servers.

Table of Contents

Chapter 1: First Steps
Determining the installed PowerShell version
Installing/upgrading PowerShell
Starting a PowerShell session
Simple PowerShell commands
PowerShell aliases
Summary
For further reading
Chapter 2: Building Blocks
What can you do?
The scripter's secret weapon – tab completion
How does that work?
Interpreting the cmdlet syntax
Summary
For further reading
Chapter 3: Objects and PowerShell
Objects all the way down
What are members?
The Get-Member cmdlet
Where did these all come from?
Summary
For further reading
Chapter 4: Life on the Assembly Line
The pipeline as an assembly line
Dealing with pipeline data
Putting them together
Summary
For further reading
Chapter 5: Formatting Output
When does formatting occur?
The rules of automatic formatting
Cmdlets that control formatting
The dangers of formatting
Best practices of formatting
Summary
For further reading
Chapter 6: Scripts
Packaging commands
Parameters add flexibility
Adding some logic
Profiles
Summary
For further reading
Chapter 7: Functions
Another kind of container
Executing and calling functions
Naming conventions
Comment-based help
Parameters revisited
Default values for parameters
Output
Summary
For further reading
Chapter 8: Modules
Packaging functions
Script modules
Where do modules live?
Removing a module
PowerShell module autoloading
The #Requires statement
Removing a module – take two
Listing modules
Summary
Chapter 9: File I/O
Reading and writing text files
Working with CSV files
PowerShell streams and redirection
CLIXML – a special type of XML
Summary
For further reading
Chapter 10: WMI and CIM
What is WMI?
Finding WMI classes
Retrieving objects with Get-WMIObject
Calling methods
WMI and CIM
CDXML modules
Summary
For further reading
Chapter 11: Web Server Administration
Installing IIS
Verifying IIS
The WebAdministration module
Starting, stopping, and restarting IIS
Creating virtual directories and web applications
Working with application pools
Summary
For further reading

What You Will Learn

  • Learn to verify your installed version of PowerShell, upgrade it, and start a PowerShell session using the ISE
  • Discover PowerShell commands and cmdlets and understand PowerShell formatting
  • Use the PowerShell help system to understand what particular cmdlets do
  • Utilise the pipeline to perform typical data manipulation
  • Package your code in scripts, functions, and modules
  • Solve common problems using basic file input/output functions
  • Find system information with WMI and CIM
  • Automate IIS functionality and manage it using the WebAdministration module

Authors

Table of Contents

Chapter 1: First Steps
Determining the installed PowerShell version
Installing/upgrading PowerShell
Starting a PowerShell session
Simple PowerShell commands
PowerShell aliases
Summary
For further reading
Chapter 2: Building Blocks
What can you do?
The scripter's secret weapon – tab completion
How does that work?
Interpreting the cmdlet syntax
Summary
For further reading
Chapter 3: Objects and PowerShell
Objects all the way down
What are members?
The Get-Member cmdlet
Where did these all come from?
Summary
For further reading
Chapter 4: Life on the Assembly Line
The pipeline as an assembly line
Dealing with pipeline data
Putting them together
Summary
For further reading
Chapter 5: Formatting Output
When does formatting occur?
The rules of automatic formatting
Cmdlets that control formatting
The dangers of formatting
Best practices of formatting
Summary
For further reading
Chapter 6: Scripts
Packaging commands
Parameters add flexibility
Adding some logic
Profiles
Summary
For further reading
Chapter 7: Functions
Another kind of container
Executing and calling functions
Naming conventions
Comment-based help
Parameters revisited
Default values for parameters
Output
Summary
For further reading
Chapter 8: Modules
Packaging functions
Script modules
Where do modules live?
Removing a module
PowerShell module autoloading
The #Requires statement
Removing a module – take two
Listing modules
Summary
Chapter 9: File I/O
Reading and writing text files
Working with CSV files
PowerShell streams and redirection
CLIXML – a special type of XML
Summary
For further reading
Chapter 10: WMI and CIM
What is WMI?
Finding WMI classes
Retrieving objects with Get-WMIObject
Calling methods
WMI and CIM
CDXML modules
Summary
For further reading
Chapter 11: Web Server Administration
Installing IIS
Verifying IIS
The WebAdministration module
Starting, stopping, and restarting IIS
Creating virtual directories and web applications
Working with application pools
Summary
For further reading

Book Details

ISBN 139781783558506
Paperback180 pages
Read More
From 4 reviews

Read More Reviews