The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This sample shows how to create a runspace, and then use that runspace to run two cmdlets synchronously by using a PowerShell object.
This sample requires Windows PowerShell 2.0.
This sample demonstrates the following.
Creating a Runspace object by using the RunspaceFactory class.
Creating a PowerShell object that uses the runspace.
Adding cmdlets to the pipeline of the PowerShell object.
Running the cmdlets synchronously.
Extracting properties from the PSObject objects returned by the command.