Display documentation for PowerShell components using Get-Help.
This is the first post in the series PowerShell 1.0 – The First Cmdlets. In this post we will cover Get-Help , which was one of the Microsoft.PowerShell.Core module cmdlets and a cmdlet we will use extensively in future posts. Note that though this cmdlet was first introduced in PowerShell 1.0, enhancements have been made through version releases and we will cover the latest features of the cmdlet.
Get-Help: What it is for
Get-Help displays help documentation for PowerShell cmdlets and concepts. It is the method from within PowerShell that you can bring up details of how to use PowerShell components. This cmdlet will be a regular part of your daily PowerShell toolbox.
Examples: How to use it
Get documentation for a cmdlet
One of the most common ways you will use Get-Help is to get documentation about how to use a specific cmdlet. You type Get-Help followed by the cmdlet name you want documentation for, so an example would be Get-Help Get-Help . Run this from a PowerShell session to see the standard help displayed.
Specify level of documentation to display
There a few parameters to control the level of documentation to display, some being more verbose than others.
- -examples will show you the examples within the help file.
- -detailed will show a more complete documentation set, including examples as well as a breakdown of the Parameters.
- -full will show you everything included in -detailed as well as Input and Output information and general Notes.
Launch online documentation from docs.microsoft.com
One of my favorite new features is to use the -online parameter to launch the help page for a given cmdlet or component that resides at docs.microsoft.com. The online help pages are well formatted and easy to navigate, so if you like to reference your documentation separate from where you are working or on a second screen (I personally do), this is a killer feature.
Get-Help Get-Help -online
See components with help available
Using Get-Help isn’t limited to cmdlets. There are multiple categories, including “About” topics (preceded with ‘about_’), functions, providers, and aliases. You can see what help options are available using wildcard searches or by specifying a category to filter:
# Wildcard search for anything beginning with about_ ("About" topics) Get-Help -Name about_* # Show Providers for which there is help information Get-Help -Category Provider
Next Up: Get/Add/Remove-PSSnapin
In the next post of the series, we will cover the PSSnapin cmdlets, Get-PSSnapin , Add-PSSnapin , and Remove-PSSnapin .
- Get-Help | docs.microsoft.com