How to use PowerShell Help commands?

To get help for the particular command, you can use Get-Help (alias: help)  cmdlet with the command that you need help.

For example,

help Get-Service

Once you run this command, you will get the description of NAME, SYNOPSIS, SYNTAX, DESCRIPTION, RELATED LINKS, and REMARKS.

Multiple parameters that support help as shown below

  • -Full − Detailed help with parameter explanation and examples.

help Get-Service -Full
  • -Detailed − Detailed help of parameters and doesn’t include the examples.

help Get-Service -Detailed
  • -Examples − Only help related to examples will be displayed on the PowerShell screen.

help Get-Service -Examples
  • -Online − Help contents for the cmdlet will be searched online on the Microsoft website.

help Get-Service -Online

When you install or update PowerShell version or install a new operating system that comes with the PowerShell installed then you need to make sure to update the help content from Microsoft website and that can be done using Update-Help command and that is recommended once in a month because some help contents get outdated and MS continuously updates their help content.

Some help for cmdlets is not visible if the outdated help resides in your system at that time you need to update the help content.

When -ShowWindow parameter is specified, help will be displayed in the separate window for that specific command. For example,

help Get-Service -ShowWindow

Here, in the Settings button, there are options to filter out specific items.

If you need any specific section(s) related help the select that setting(s).

If you need help with the parameters in command line then use -Parameter and command name. For example,

help Get-Service -Parameter ComputerName

PS C:\Users\Chirag.Nagarekar> help Get-Service -Parameter ComputerName -ComputerName <System.String[]>
Gets the services running on the specified computers. The default is the local computer.
Type the NetBIOS name, an IP address, or a fully qualified domain name (FQDN)
of a remote computer. To specify the local computer, type the
computer name, a dot (.), or localhost.

This parameter does not rely on Windows PowerShell remoting. You can use the
ComputerName parameter of Get-Service even if your computer is not configured to run remote commands.

Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false

If you need to display all the parameters then use * instead of the parameter name.

help Get-Service -Parameter *

Similarly, if you need help related to only example sections in command line then use -Examples in command.

help Get-Service -Examples

Updated on: 26-Aug-2020

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started