O'Reilly logo

Learn Windows PowerShell in a Month of Lunches, Third Edition by Don Jones and Jeffery Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. The pipeline: connecting commands

In chapter 4, you learned that running commands in PowerShell is the same as running commands in any other shell: You type a command name, give it parameters, and hit Enter. What makes PowerShell special isn’t the way it runs commands, but the way it allows multiple commands to be connected to each other in powerful, one-line sequences.

6.1. Connecting one command to another: less work for you

PowerShell connects commands to each other by using a pipeline. The pipeline provides a way for one command to pass, or pipe, its output to another command, allowing that second command to have something to work with.

You’ve already seen this in action in commands such as Dir | More. You’re piping the output ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required