Home » PowerShell » PowerShell Get-Help Command

PowerShell Get-Help Command

The `Get-Help` command in PowerShell is used to display information about PowerShell commands, modules, scripts, functions, providers, aliases, and other concepts. To get help for a PowerShell command, type Get-Help followed by the cmdlet name, such as Get-Help Install-Package.

The Get-Help command provides helpful content that it displays from help files on your computer. Without help files, the Get-Help displays only basic information about commands.

To get the online version of a help file, use the Online parameter, such as Get-Help Install-Package -Online.

The Get-Help command in PowerShell can be used to

  • Display help information about a command
  • Display help information about a module
  • Display help information about a script
  • Display help information one page at a time
  • Display more information about a command
  • Display the online version of the help
  • Display help about the help system

In this article, we will discuss how to use the PowerShell Get-Help command to get help content for commands, modules, scripts, and other concepts.

How to Get Help on Command

To get help on a command, use the Get-Help command. It displays basic help information about a cmdlet.

Get-Help Get-Package

In the above PowerShell script, the Get-Help command gets help for a command Get-Package and displays information about a command that includes its Name, Synopsis, Syntax, Description, Related links, etc.

The output of the above PowerShell command to get help on a command is given below.

Get Help on Command
Get Help on Command

You can get help on a cmdlet using the syntax <cmdlet-name> -?. The -? parameter will display a help topic that includes the syntax and description for the command.

Get-Package -?

How to Get Help on a Module in PowerShell

To get help on a module in PowerShell, use the Get-Help cmdlet. The Get-Help command provides detailed help on a specific module.

Get-Help PackageManagement

In the above PowerShell script, the Get-Help command gets help on the PackageManagement module.

The output of the above PowerShell script will display a help topic that includes a description, parameters, cmdlets, and examples for the module.

You can also use the -? parameter with a module name. The -? parameter provides basic help on a module.

PackageManagement -?

How to Get Help for a Script in PowerShell

You can use the Get-Help cmdlet in PowerShell to get help for a script. The Get-Help command provides detailed help on a specific script.

Get-Help -Name C:\scripts\myscript.ps1

In the above PowerShell script, the Get-Help cmdlet gets help on a script named myscript.ps1.

You can also use -? parameter with a script to get basic help on a script.

C:\scripts\myscript.ps1 -?

How to Get Online Version of Help for a Command

To get the online version of the help for a command, use the Get-Help cmdlet with the Online parameter.

Get-Help Install-Package -Online

In the above PowerShell script, the Get-Help cmdlet gets an online version of help for the command Install-Package.

How to Get Detailed Information for a Cmdlet

You can use the Get-Help command with the Detailed parameter to get more information for a cmdlet.

Get-Help Find-Package -Detailed

In the above PowerShell script, the Get-Help command uses the Detailed parameter that displays the help article’s detailed view that includes parameter description and examples for the command Find-Package.

How to Get Information About the Help System

Use the Get-Help cmdlet without parameters to display information about the PowerShell help system

Get-Help

How to List All Available Help Topics in PowerShell

To display a list of all available help topics on your computer, use the Get-Help command with *.

Get-Help *

Conclusion

I hope the above article on how to use the Get-Help command in PowerShell to get help on a command, module, script, and other concepts is helpful to you.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.