Chapter 3. PowerShell’s scripting language

Before we dive into scripting and toolmaking, we need to cover a few background concepts—some of which are unique to PowerShell. We’re also going to do a lightning overview of PowerShell’s scripting constructs. If this seems a bit brief, don’t worry—we’ll be re-explaining a lot of these when you see them in a more practical context. The idea now is to familiarize you with what’s ahead.

3.1. One script, one pipeline

A PowerShell script isn’t exactly like a command-line batch file, and running a script isn’t precisely the same as running the same commands yourself in the same sequence. For example, open a console window and run the following, pressing Enter after each line:

Get-Service Get-Process ...

Get Learn PowerShell Toolmaking in a Month of Lunches now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.