O'Reilly logo

Automating Microsoft® SharePoint® 2010 Administration with Windows PowerShell® 2.0 by Shannon Bray, Gary Lapointe

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

Work with Output

After you've declared and set your variable or executed a specific cmdlet, you're likely to need to pass that information into another cmdlet or otherwise display the results to the console in some formatted fashion. In the following sections, we will review passing data between cmdlets and how to format the results in the console.

Understand the Object Pipeline and PipeBind Objects

Many scripting languages provide a mechanism to “pipe” output from one command to another. In the command prompt console, you can simply use the pipe operator (|) to pass information between commands as shown in this example that demonstrates how to find STSADM commands with the text user in them:

C:\>stsadm -help | find “user” add-ecsuserdefinedfunction ...

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