Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.36 KB

File metadata and controls

31 lines (24 loc) · 1.36 KB
description RunSpace06 Code Sample
ms.date 09/13/2016
ms.topic reference
title RunSpace06 Code Sample

RunSpace06 Code Sample

Here is the source code for the Runspace06 sample described in Configuring a Runspace Using a Windows PowerShell Snap-in. This sample application creates a runspace based on a Windows PowerShell snap-in, which is then used to run a pipeline with a single command. To do this, the application creates the runspace configuration information, creates a runspace, creates a pipeline with a single command, and then executes the pipeline.

Note

You can download the C# source file (runspace06.cs) by using the 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 Sample

:::code language="csharp" source="~/../powershell-sdk-samples/SDK-2.0/csharp/Runspace06/Runspace06.cs" range="11-85":::

See Also

Windows PowerShell Programmer's Guide

Windows PowerShell SDK