| description | RunSpace05 Code Sample |
|---|---|
| ms.date | 09/13/2016 |
| ms.topic | reference |
| title | RunSpace05 Code Sample |
Here is the source code for the Runspace05 sample that is described in
Configuring a Runspace Using RunspaceConfiguration.
This sample shows how to create the runspace configuration information, create a runspace, create a
pipeline with a single command, and then execute the pipeline. The command that is executed is the
Get-Process cmdlet.
Note
You can download the C# source file (runspace05.cs) by using the Microsoft Windows Software Development Kit for Windows Vista and Microsoft .NET Framework 3.0 Runtime Components. For download instructions, see How to Install Windows PowerShell and Download the Windows PowerShell SDK. The downloaded source files are available in the <PowerShell Samples> directory.
:::code language="csharp" source="~/../powershell-sdk-samples/SDK-2.0/csharp/Runspace05/Runspace05.cs" range="11-86":::