GetProc03 Code Samples

Here are the code samples for the GetProc03 sample cmdlet. This is the Get-Process cmdlet sample described in Adding Parameters that Process Pipeline Input. This Get-Process cmdlet uses a Name parameter that accepts input from a pipeline object, retrieves process information from the local computer based on the supplied names, and then displays information about the processes at the command line.

Note

You can download the C# source file (getprov03.cs) for this Get-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.

For complete sample code, see the following topics.

Language Topic
C# GetProc03 (C#) Sample Code
VB.NET GetProc03 (VB.NET) Sample Code

See Also

Windows PowerShell Programmer's Guide

Windows PowerShell SDK