Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.35 KB

File metadata and controls

28 lines (22 loc) · 1.35 KB
description StopProcessSample04 (C#) Sample Code
ms.date 09/13/2016
ms.topic reference
title StopProcessSample04 (C#) Sample Code

StopProcessSample04 (C#) Sample Code

Here is the complete C# sample code for the StopProc04 sample cmdlet. This is the code for the Stop-Process cmdlet described in Adding Parameter Sets to a Cmdlet. The Stop-Process cmdlet is designed to stop processes that are retrieved using the Get-Proc cmdlet (described in Creating Your First Cmdlet).

Note

You can download the C# (stopprocesssample04.cs) source file for this Stop-Proc cmdlet using the Microsoft Windows Software Development Kit for Windows Vista and .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/StopProcessSample04/StopProcessSample04.cs" range="11-435":::

See Also

Windows PowerShell Programmer's Guide

Windows PowerShell SDK