A cmdlet (pronounced “command-let”) is a compiled command. A cmdlet can be developed in .NET or .NET Core and invoked as a command within PowerShell. Thousands of cmdlets are available in your PowerShell installation. The challenge lies in discovering what the cmdlets are and what they can do for you.
Cmdlets are named according to a verb-noun naming standard. This pattern can help you to understand what they do and how to search for them. It also helps cmdlet developers create consistent names. You can see the list of approved verbs by using the Get-Verb cmdlet. Verbs are organized according to activity type and function.
Here’s a part of the output from running Get-Verb:
OutputCopy
Verb AliasPrefix Group Description
---- ----------- ----- -----------
Add a Common Adds a resource to a container, or atta…
Clear cl Common Removes all the resources from a contai…
This listing shows the verb and its description. Cmdlet developers should use an approved verb, and also ensure that the verb description fits their cmdlet’s function.
Three core cmdlets allow you to delve into what cmdlets exist and what they do:
- Get-Command: The
Get-Commandcmdlet lists all of the available cmdlets on your system. Filter the list to quickly find the command you need. - Get-Help: Run the
Get-Helpcore cmdlet to invoke a built-in help system. You can also run an aliashelpcommand to invokeGet-Helpbut improve the reading experience by paginating the response. - Get-Member: When you call a command, the response is an object that contains many properties. Run the
Get-Membercore cmdlet to drill down into that response and learn more about it.
erp
Leave a Reply