PowerShell Daily Dose: Get-Help


Today I have started really learning PowerShell which is notorious for its steep learning curve. After learning a few commands in depth I decided it was better if I documented my learning as a ‘one command a day’ feature. So here it goes…

(This is not a PowerShell tutorial, so I am not going to explain what a cmdlet is nor am I going to venture deep into explaining any specific term :).)
Today’s cmdlet:

Get-Help

This is the first cmdlet that everyone should probably learn. As the name suggests, this cmdlet gets you information about any Powershell command (including itself :)). The usage is ‘Get-Help <command>’.

For example, if you type “Get-Help Get-Help”, this is the output you see in PowerShell:

NAME
 Get-Help
SYNTAX
 Get-Help [[-Name] <string>] [-Path <string>] [-Category <string[]> {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter | ExternalScript |
 All | DefaultHelp | Workflow}] [-Component <string[]>] [-Functionality <string[]>] [-Role <string[]>] [-Full] [<CommonParameters>]
Get-Help [[-Name] <string>] -Detailed [-Path <string>] [-Category <string[]> {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter |
 ExternalScript | All | DefaultHelp | Workflow}] [-Component <string[]>] [-Functionality <string[]>] [-Role <string[]>] [<CommonParameters>]
Get-Help [[-Name] <string>] -Examples [-Path <string>] [-Category <string[]> {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter |
 ExternalScript | All | DefaultHelp | Workflow}] [-Component <string[]>] [-Functionality <string[]>] [-Role <string[]>] [<CommonParameters>]
Get-Help [[-Name] <string>] -Parameter <string> [-Path <string>] [-Category <string[]> {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function |
 Filter | ExternalScript | All | DefaultHelp | Workflow}] [-Component <string[]>] [-Functionality <string[]>] [-Role <string[]>] [<CommonParameters>]
Get-Help [[-Name] <string>] -Online [-Path <string>] [-Category <string[]> {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter |
 ExternalScript | All | DefaultHelp | Workflow}] [-Component <string[]>] [-Functionality <string[]>] [-Role <string[]>] [<CommonParameters>]
Get-Help [[-Name] <string>] -ShowWindow [-Path <string>] [-Category <string[]> {Alias | Cmdlet | Provider | General | FAQ | Glossary | HelpFile | ScriptCommand | Function | Filter |
 ExternalScript | All | DefaultHelp | Workflow}] [-Component <string[]>] [-Functionality <string[]>] [-Role <string[]>] [<CommonParameters>]
ALIASES
 None
REMARKS
 Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
 -- To download and install Help files for the module that includes this cmdlet, use Update-Help.
 -- To view the Help topic for this cmdlet online, type: "Get-Help Get-Help -Online" or
 go to http://go.microsoft.com/fwlink/?LinkID=113316.

This cmdlet can also be used with wildcard-ed nouns and verbs. For example, if you would like to see all the ‘Get’ cmdlets, you would use something like:

Get-Help -Name Get-*

That results in an output like this:

Name Category Module Synopsis
---- -------- ------ --------
Get-Verb Function
Get-Command Cmdlet Microsoft.PowerShell.Core ...
Get-Module Cmdlet Microsoft.PowerShell.Core ...
Get-Help Cmdlet Microsoft.PowerShell.Core ...

So that’s the Get-Help cmdlet.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s