Information on acquiring information about Cmdlets and using the help system effectively.
To acquire information on a command or subject, use the
Get-Help [Cmdlet] command. The
help aliases are available, but note that
they automatically pipe to
More for improved viewing.
You can use the
-online flag to browse the help documentation online.
In order to view documentation on commands, you will need to update documentation for powershell. This can easily be done using
Update-Help, but you need to be running in administrator to do this. I personally recommend using
-Forceto ‘assist’ some modules into updating.
Note that there are options for updating help, take a look at
Update-Help -SourcePath to do this.
In the search for a specific command, you can use wildcards to make it easy. The wildcard character matches
searches for 0 or more characters; thus if you place
* in front of
event and search for it:
you’ll find it matching anything that ends with
event in the subject’s name, regardless of what comes before it.
Get-Help searches for help topics, modules that may or may not exist for every command (while they most likely do, it’s not 100%).
Furthermore, your results could be polluted by topics you aren’t interested in; if you strictly want commands,
Get-Command is your friend.
Do note though: while
Get-Command supports wildcard, you should use the
-Verb parameters to make sure
no external commands are returned (Only Cmdlets have nouns or verbs). Another way is with the
-Type parameter, (i.e.
Get-Help [Subject] help [Subject] man [Subject] Get-Help [Subject] | More help [Subject] -online # Open the help documentation online, in the browser [Cmdlet] -? help *event* help Get-Event -Full # Include all information on the subject at once help Get-Service -Examples # Look at examples for the given command help Get-Service -Parameter ComputerName # Look at information on specific parameter help gsv -ShowWindow # Present the help information in a small window with search, selection and scrolling Get-Command -Noun *event -Verb Get # Find all Cmdlets that end with "Event" and use "Get" as their verbx gcm -Noun *event* -Type Cmdlet # Find all Cmdlets that end with "Event"