Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Get-Command

Get-Command - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Gets basic information about cmdlets and other elements of Windows PowerShell commands.

Get-Command [[-Name] <string[]>] [-CommandType {Alias | Function | Filter | Cmdlet | ExternalScript | Application |
 Script | All}] [[-ArgumentList] <Object[]>] [-Module <string[]>] [-Syntax] [-TotalCount <int>] [<CommonParameters>

Get-Command [-Noun <string[]>] [-Verb <string[]>] [[-ArgumentList] <Object[]>] [-Module <string[]>] [-Syntax] [-Tot
alCount <int>] [<CommonParameters>]

The Get-Command cmdlet gets basic information about cmdlets and other elements of Windows PowerShell commands in th
e session, such as aliases, functions, filters, scripts, and applications. 

Get-Command gets its data directly from the code of a cmdlet, function, script, or alias, unlike Get-Help, which ge
ts its information from help topic files.

Without parameters, "Get-Command" gets all of the cmdlets and functions in the current session. "Get-Command *" get
s all Windows PowerShell elements and all of the non-Windows-PowerShell files in the Path environment variable ($en
v:path). It groups the files in the "Application" command type. 

You can use the Module parameter of Get-Command to find the commands that were added to the session by adding a Win
dows PowerShell snap-in or importing a module.