O'Reilly logo

Pro Windows PowerShell by Hristo Deshev

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

3.2. Object-Based Pipelines

Now that you've seen some of the serious limitations in passing text between commands, we can focus on a solution that will eliminate the need to do so using PowerShell's approach to pipelining. PowerShell postulates that each command—in PowerShell parlance, cmdlet—will be a .NET object that satisfies a contract and has a standard interface. Building on .NET allows the shell to pass .NET objects instead of text. This thing is huge! It means that we no longer have to generate parsable text, nor do we have to parse text coming from another program. The pipeline is not a text stream; it is a full-blown collection containing real, live objects. Those objects expose a set of properties and methods that already contain ...

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