PowerShell Get-Help Command Explained With Examples

Photo of author

By Victor Ashiedu

Published

Have you been wondering how to get help in PowerShell? PowerShell has a robust help cmdlet known as Get-Help and this guide teaches ,you all about it.

I begin the guide with an overview of the Get-Help command. Then, in the second section, you’ll learn the syntaxes of the the Get-Help command.

Next up is a section where I explain, in detail, the parameters of the PowerShell Get-Help command. Then, in section five, I will dive deep into the applications and examples of the Get-Help command.

To top it all up, I also included an FAQ section where I answer common questions SysAdmins ask about the Get-Help command.

Overview

Overview Of The PowerShell Get-Help Command

I strongly believe that the most important PowerShell command is the Get-Command cmdlet. Also, I think the next important cmdlet is the Get-Help cmdlet.

I believe that the Get-Command cmdlet is the most important because you need this cmdlet to find other cmdlets. Then, once you get a cmdlet, you need the Get-Help cmdlet to learn how to use the cmdlet.

Talking about the Get-Help cmdlet, the Get-Help cmdlet displays information about a cmdlet, function, workflows, providers, aliases, and scripts.

To use the Get-Help cmdlet to get information about a cmdlet, type:

Get-Help <cmdlet_name>

You can also use the Get-Help command to display conceptual help articles. Conceptual help articles begin with about_.

For example, the conceptual help article for Comparison Operators is about_Comparison_Operators.

To display conceptual help articles, use the command below:

Get-Help about_*
Replace the asterisks (*) with the conceptual article, for example, Comparison_Operators

I will discuss the detailed syntaxes and parameters of the PowerShell Get-Help command in subsequent sections. But before I move on from this section, it is important to note that the Get-Help command, like other PowerShell cmdlets, has multiple parameters.

In the next section, I’ll discuss the different syntaxes of the Get-Help command. Then, I will discuss the parameters of the command and explain what each parameter does.

Syntaxes Of The PowerShell Get-Help Command

The general syntax of the PowerShell Get-Help command is…

Get-Help -Name <cmdlet_name> 

However, the Get-Help command has 4 distinct syntaxes. I have listed all the syntaxes below.

In addition, I have boldened the parameters that differentiate the syntaxes…

Get-Help
   [[-Name] <String>]
   [-Path <String>]
   [-Category <String[]>]
   [-Full]
   [-Component <String[]>]
   [-Functionality <String[]>]
   [-Role <String[]>]
   [<CommonParameters>]
Get-Help
   [[-Name] <String>]
   [-Path <String>]
   [-Category <String[]>]
   -Detailed

   [-Component <String[]>]
   [-Functionality <String[]>]
   [-Role <String[]>]
   [<CommonParameters>]
Get-Help
   [[-Name] <String>]
   [-Path <String>]
   [-Category <String[]>]
   -Examples

   [-Component <String[]>]
   [-Functionality <String[]>]
   [-Role <String[]>]
   [<CommonParameters>]
Get-Help
   [[-Name] <String>]
   [-Path <String>]
   [-Category <String[]>]
   -Parameter <String[]>
   [-Component <String[]>]
   [-Functionality <String[]>]
   [-Role <String[]>]
   [<CommonParameters>]
Get-Help
   [[-Name] <String>]
   [-Path <String>]
   [-Category <String[]>]
   [-Component <String[]>]
   [-Functionality <String[]>]
   [-Role <String[]>]
   -Online

   [<CommonParameters>]
Get-Help
   [[-Name] <String>]
   [-Path <String>]
   [-Category <String[]>]
   [-Component <String[]>]
   [-Functionality <String[]>]
   [-Role <String[]>]
   -ShowWindow

   [<CommonParameters>]

In the next section of this article, I will explain each parameter. However, before then, to make the above syntaxes easy to use, I have listed the syntaxes in their most simplified forms…

Get-Help <cmdlet_name> -Full
Get-Help <cmdlet_name> -Detailed
Get-Help <cmdlet_name> -Examples
Get-Help <cmdlet_name> -Parameter
Get-Help <cmdlet_name> -Online
Get-Help <cmdlet_name> -ShowWindow

Parameters Of The PowerShell Get-Help Command Explained

I divided this section into two subsections.

In the first subsection, I have used a table to explain the parameters common to all 6 syntaxes of the PowerShell Get-Help command.

Then, in the subsequent subsections, I have discussed in greater detail the six (6) parameters that differentiate the 6 syntaxes of the Get-Help command.

Common Parameters For The 6 Syntaxes Of The PowerShell Get-Help Command Explained

PowerShell Get-Help ParametersComments/Notes
NameMost users will not specify the -Name parameter because its position is zero (0). So, even if you do not specify this parameter, PowerShell identifies any string you type next to Get-Help as the name of a cmdlet.
PathWhen you specify the Path parameter, PowerShell explains how the cmdlet works in the specified provider path. Use the Path parameter of the PowerShell Get-Help to specify the path to a provider.
CategoryIf you want to display help only for items in the specified category and their aliases, use the Category parameter to specify that category. You can specify the following values –
Alias, Cmdlet, Provider, General, FAQ, Glossary, HelpFile, ScriptCommand, Function, Filter, ExternalScript, All, DefaultHelp, Workflow, DscResource, Class, Configuration
ComponentIf you want the PowerShell Get-Help command to display help topics for cmdlets you can use for a specific component, enter the name of the component. For example, if you want a help topic for cmdlets related to Exchange, enter Exchange. You can also use wildcards.
FunctionalityUse the Functionality parameter to display help for items with the specified functionality. This parameter accepts wildcards.
RoleUse the Role parameter in the PowerShell Get-Help command to display help customized for the specified user role. Then enter the role. As with the last two parameters above, this parameter allows wildcards.

As I mentioned earlier, I will now explain the 6 parameters that differentiate the 6 syntaxes of the PowerShell Get-Help command. Note that you CAN NOT use any of the parameters discussed below in the same Get-Help command.

Get-Help –Detailed Parameter Explained

When you use the –Detailed parameter of the PowerShell Get-Help command, it adds parameter descriptions and examples to the basic help display.

For example, if I run the basic Get-Help command with the Get-Command cmdlet, it displays the items in the screenshot that follows…

Get-Help Get-Command
PowerShell  Get-Help -Detailed Parameter

However, if I want Get-Help to display the parameter description and examples of how to use the Get-Command cmdlet, I’ll run the command below that includes the –Detailed parameter:

Get-Help Get-Command -Detailed

I piped the above command to “more” so that PowerShell displays the information on one page per time. If I want to display the next page, I’ll press the enter key on my keyboard.

As you can see from the screenshot below, the command adds a PARAMETERS section. Furthermore, in this PARAMETERS section, Get-help includes a description of each parameter.

If I continue pressing the enter key, I will get to a point where I see examples of how to use the Get-Command command.

PowerShell  Get-Help -Detailed Parameter

Get-Help –Full Parameter Explained

In the last sub-section, I explained that when you use the –Detailed parameter of the PowerShell Get-Help command, it adds two sections – detailed parameter description and examples.

Unlike the –Detailed parameter that just adds these two additional sections, when you use the –Full parameter of the PowerShell Get-Help command, you get the entire help article for a cmdlet.

In other words, the –Full parameter foes further than the –Detailed parameter.

If you want to see the –Full parameter in action, run the command below for the Get-Command cmdlet…

Get-Help Get-Command -Full

Get-Help –Parameter Parameter Explained

While the –Detailed and –Full parameters display additional help articles for a cmdlet, the –Parameter parameter displays specific information.

Specifically, if you want to find out how to use a specific parameter of a cmdlet, use the –Parameter parameter of the Get-Help command.

The best way to approach using the –Parameter parameter to get information is to list all the parameters first. Then, hone in on a specific parameter with the same –Parameter parameter.

Continuing with the Get-Command cmdlet, to list help topics for all the parameters of this cmdlet, run the command below:

Get-Help Get-Command -Parameter *

As expected, the above command displays the descriptions of all the parameters of the Get-Command cmdlet.

PowerShell  Get-Help -Parameter Parameter

Moreover, if I want to display a help description for the ArgumentList parameter of the Get-Command cmdlet, I’ll run the command below:

Get-Help Get-Command -Parameter ArgumentList

Much better! The command displays a description just for the ArgumentList parameter.

This is easier to read as you do not have too much information on the screen!

Get-Help –Online Parameter Explained

The parameters I have been describing so far displays help topic from the help files stored locally on your computer. In addition to locally stored help topics, each PowerShell cmdlet has an online help topic page.

If you want to go to the online help page of a PowerShell cmdlet, use the Get-Help command with the –Online parameter. For example, to open the online help page for the Get-Command cmdlet, run the command below:

Get-Help Get-Command -Online

When I ran the above command, it opened Microsoft’s online help page for Get-Command.

Get-Help Get-Command -Online

Get-Help –ShowWindow Parameter Explained

This parameter was introduced in PowerShell version 7.0. So, if you use it in any version lower than 7.0, PowerShell will NOT display any results.

The –ShowWindow parameter of the Get-Help command displays the help topic of a cmdlet in a window for easier reading. Essentially, instead of displaying the help topic within the PowerShell console, with the –ShowWindow parameter, Get-Help displays the help topic in a GUI window.

Here is an example in my PowerShell version 7.2.5…

Get-Help Get-Command -ShowWindow

One of the benefits of displaying the help topic in a GUI window is that the window includes a search feature.

Get-Help Get-Command -ShowWindow

So, if I want to find an item in the help topic, I can use the search feature. For example, when I enter “argumentlist” in the search box, it highlights everywhere the text is in the help article.

Get-Help –Examples Parameter Explained

The final PowerShell Get-Help parameter of the 6 syntaxes is the –Examples parameter. As the name suggests, when you use the –Examples parameter, Get-Help displays examples in the help article of a cmdlet.

Continuing with the Get-Command cmdlet, to display the examples in the help article of this cmdlet, I’ll run the command below:

Get-Help Get-Command -Examples

The –Examples parameter of the PowerShell Get-Help command is very helpful because it shows you how to use a cmdlet.

PowerShell Get-Help Command Examples

So far in this guide, you’ve learned the six syntaxes of the PowerShell Get-Help command. I have also covered the parameters of Get-Help, including a detailed explanation of the six parameters that make up the 6 syntaxes.

In this section, I will discuss some examples and applications of the Get-Help command.

How To Use The Get-Help Command To Display Cmdlet Aliases

I am kicking off this section by showing you how to display aliases of cmdlets on your computer. To list all the aliases of cmdlets on your computer and their cmdlets, run the command below…

Get-Help -Category Alias

The command displays all aliases and their equivalent cmdlets.

As shown in the screenshot above, the last command returns a column called Synopsis. You can use this property to return the alias of a cmdlet.

For example, to return the alias of the Copy-Item cmdlet, you will run the command below…

Get-Help -Category Alias | Where-Object {$_.Synopsis -eq "Copy-Item"}

The command shows that the Copy-Item cmdlet has three aliases – cpi, cp, and copy.

So, you can use one of these aliases instead of Copy-Item.

How To Use Get-Help To Display About_Command_Precedence Help Article

The ABOUT_COMMAND_PRECEDENCE article teaches you how PowerShell determines which command to run. To display the help article for ABOUT_COMMAND_PRECEDENCE, run the command below.

Get-Help About_Command_Precedence

The last command displays information about how PowerShell handles command precedence.

How To Use Get-Help To Display About_Command_Precedence Help Article

Based on the information the last command displayed, here is how PowerShell command precedence works –

When you run a PowerShell command that has multiple command possibilities, PowerShell decides which command to run by using the following
rules:

  1. If you specify the full path to the command, for example, the path to a script file, PowerShell runs the command specified in the path.
  2. However, if you do not specify a path to a PowerShell script, PowerShell uses the following priority order to determine what command to run based on similar commands loaded in the current session:
    – Alias
    – Function
    – Cmdlet
    – External executable files (programs and non-PowerShell scripts)

So, if I run the command “copy,” PowerShell looks for an alias named “copy.” If it finds the alias, it runs it. However, if PowerShell does not find an alias named “copy,” it then checks for a Function named “copy.”

If it finds it, it runs the function. Otherwise, PowerShell will move on to check for a cmdlet called “copy” in the current session.

Finally, if there is no alias, Function, or cmdlet, PowerShell will check for an external (non-PowerShell) executable named “copy.”

It is important to mention that PowerShell runs the first item it finds named “copy.”

How To Use Get-Help To Display About_Execution_Policies Help Article

PowerShell uses execution policies to safeguard your computer from accidentally running malicious scripts. If you want to learn about PowerShell execution policies and how to manage them, run the command below…

Get-Help About_Execution_Policies

You can also learn about PowerShell ExecutionPolicy by reading my article – PowerShell ExecutionPolicy Explained: Important Safety Feature.

How To Use Get-Help To Display Help Article For Set-ExecutionPolicy

In the last section, I mentioned that you could use the PowerShell Get-Help command to display the help article for About_Execution_Policies. If you ran the command in that section or read my article on the topic, you would have seen that one of the cmdlets you need to manage execution policies is the Set-ExecutionPolicy cmdlet.

To learn how to use the Set-ExecutionPolicy cmdlet, run the command below.

Get-Help Set-ExecutionPolicy

As I mentioned in the third section of this article, the Get-Help command has a parameter called -Examples. To use this parameter to display examples and usage for the Set-ExecutionPolicy cmdlet, run the command below.

Get-Help Set-ExecutionPolicy -Examples

Finally, run the command below to open the online help page for the Set-ExecutionPolicy cmdlet.

Get-Help Set-ExecutionPolicy -Online

How To Use Get-Help To Display About_Redirection Help Article

Another important PowerShell topic you should learn is the About_Redirection. This help article teaches you how to redirect output from PowerShell to text files.

Run the command below to display the help topic about Redirection and how it works.

Get-Help About_Redirection

The command will display information about the different redirections available in PowerShell. The table below summarizes the three PowerShell redirection operators.

OperatorSyntaxDescription/Notes
>n>Send specified stream to a file
>>n>>APPEND specified stream to a file
&1n>&1Redirects the specified stream to the SUCCESS stream

Frequently Asked Questions

1. How Do I Get Help In PowerShell?

To get help with a PowerShell cmdlet, use the Get-Help command. For example, to get help with the Get-ChildItem cmdlet, run the command below:

Get-Help Get-ChildItem

The command displays the syntax and parameters of the Get-ChildItem cmdlet.

2. What Is Get-Service In PowerShell?

The Get-Service cmdlet lists the services on a local or remote computer.

3. How Do I Update Get Help PowerShell?

To update, get help PowerShell, and run the Update-Help command.

4. How Do I Update My PowerShell App?

To update the PowerShell app on your computer, follow the steps below:

i) Click this link to download the Windows MSI package for the 64-bit version of PowerShell – https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/PowerShell-7.2.6-win-x64.msi
ii) Then, double-click the MSI file you downloaded to install the latest version of PowerShell for Windows.

Alternatively, if you wish to update PowerShell for Linux or macOS, open this link – https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.2

Then, click on the Linux or macOS section.

5. Is PowerShell The Same As CMD?

No, PowerShell is NOT the same as CMD. Rather, PowerShell is a more robust Windows shell that Microsoft built on the .Net Framework.

To compare PowerShell and CMD, read my article – Windows PowerShell vs CMD: Why PowerShell Is Better

My Final Thoughts

My Final Thoughts About The PowerShell Get-Help Command

The PowerShell Get-Help command is the second most important command after Get-Command. While you use the Get-Command cmdlet to find commands, you use the Get-Help to learn how to use those commands.

In this guide, I covered different ways you can use PowerShell Get-Help to learn about cmdlets. I started the guide with an overview of the Get-Help command.

Then, I discussed the syntaxes and parameters of the Get-Help command. Finally, the guide covered some examples and applications of the PowerShell Get-Help command.

I hope you found this guide helpful. If you did, kindly spare two minutes to share your thoughts with [discourse_topic_url].

You may also ask a question by replying to this article’s topic at [discourse_topic_url].

Finally, to learn more about PowerShell, visit our Windows PowerShell How-To Guides or PowerShell & Windows Command Prompt Explained pages.

References And Further Reading

  1. PowerShell Get-Command Explained With Examples (www.itechguides.com)
  2. Get-Help (Microsoft.PowerShell.Core) – PowerShell | Microsoft Docs
  3. PowerShell ExecutionPolicy Explained: Important Safety Feature (www.itechguides.com)
  4. Install PowerShell on Windows, Linux, and macOS – PowerShell | Microsoft Docs
  5. [discourse_topic_url]
We go the extra mile to deliver the highest quality content for our readers. Read our Content Writing, Content Review, and Anti-Plagiarism policies to learn more.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

If this article does not meet your expectations, kindly let us know. We have various ways you can get in touch with us:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend