Contact Info

Crumbtrail » Administration » Powershell » Powershell 1.0 » Get-Command

Get-Command - Powershell 1.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.


Retrieve basic information about a command


        Get information for cmdlets (or command elements) with this name.
        All or part of the name, wildcards are permitted.
        Get information for cmdlet names that include the specified verb.
        "Get", "Set", "Remove" etc.  Wildcards are permitted and multiple
        verbs or verb patterns can be specified: "*et".
        Get information for cmdlet names that include the specified noun.
        "process", "Service", "Variable" etc. Wildcards are permitted:"*item*"
        Get only specified types of command objects:
             Alias              Powershell Alias
             Application        All non-PowerShell files in the PowerShell path.
             Cmdlet             Powershell Cmdlet (default)
             Filter             All PowerShell functions
             Functon            All PowerShell functions
        You can use -CommandType or its alias, -Type.
        Count the number of items retrieved.
        Describe the item:
        alias name, cmdlet syntax, function definition, filter definition,
        script path/filename.
        Get information about a cmdlet when it is used with a specific argument,
        such as a file path or a registry key. e.g., "HKML\Software" or "cert:\my".
        This is useful because some cmdlet parameters are added dynamically.
        Get the cmdlets supported by the specified Windows PowerShell snap-in. 
        For more info, type "get-help about-PSSnapins".


Describe the 'Set' verbs:

PS C:\>get-command -verb set | format-list
PS C:\>get-command -verb set | format list *

Display cmdlets in noun-based groups:

PS C:\>get-command | sort-object noun | format-table -group noun

Retrieve information about all the elements available to PowerShell (all files, functions, aliases and cmdlets):

PS C:\>get-command *