Get-Help

Applies To: Windows PowerShell 2.0

Displays information about Windows PowerShell commands and concepts.

Syntax

Get-Help [[-Name] <string>] [-Category <string[]>] [-Component <string[]>] [-Full] [-Functionality <string[]>] [-Online] [-Path <string>] [-Role <string[]>] [<CommonParameters>]

Get-Help [[-Name] <string>] [-Category <string[]>] [-Component <string[]>] [-Detailed] [-Functionality <string[]>] [-Online] [-Path <string>] [-Role <string[]>] [<CommonParameters>]

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

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

Description

The Get-Help cmdlet displays information about Windows PowerShell concepts and commands, including cmdlets, providers, functions, aliases and scripts. To get a list of all cmdlet help topic titles, type "get-help *".

If you type "Get-Help" followed by the exact name of a help topic, or by a word unique to a help topic, Get-Help displays the topic contents. If you enter a word or word pattern that appears in several help topic titles, Get-Help displays a list of the matching titles. If you enter a word that does not appear in any help topic titles, Get-Help displays a list of topics that include that word in their contents.

In addition to "get-help", you can also type "help" or "man", which displays one screen of text at a time, or "<cmdlet-name> -?", which is identical to Get-Help but works only for cmdlets.

You can display the entire help file or selected parts of the file, such as the syntax, parameters, or examples. You can also use the Online parameter to display an online version of a help file in your Internet browser.

Conceptual help topics in Windows PowerShell begin with "about_", such as "about_Comparison_Operators". To see all "about_" topics, type "get-help about_*". To see a particular topic, type "get-help about_<topic-name>", such as "get-help about_Comparison_Operators".

For information about the symbols that Get-Help displays in the command syntax diagram, see about_Command_Syntax. For information about parameter attributes, such as Required and Position, see about_Parameters.

Parameters

-Category <string[]>

Displays help for items in the specified category. Valid values are Alias, Cmdlet, Provider, and HelpFile. Conceptual topics are in the HelpFile category.

Category is a property of the MamlCommandHelpInfo object that Get-Help returns. This parameter has no effect on displays of conceptual ("about_") help.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Component <string[]>

Displays a list of tools with the specified component value, such as "Exchange." Enter a component name. Wildcards are permitted.

Component is a property of the MamlCommandHelpInfo object that Get-Help returns. This parameter has no effect on displays of conceptual ("About_") help.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Detailed

Adds parameter descriptions and examples to the basic help display.

This parameter has no effect on displays of conceptual ("About_") help.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Examples

Displays only the name, synopsis, and examples. To display only the examples, type "(get-help <cmdlet-name>).examples".

This parameter has no effect on displays of conceptual ("About_") help.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Full

Displays the entire help file for a cmdlet, including parameter descriptions and attributes, examples, input and output object types, and additional notes.

This parameter has no effect on displays of conceptual ("About_") help.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Functionality <string[]>

Displays help for items with the specified functionality. Enter the functionality. Wildcards are permitted.

Functionality is a property of the MamlCommandHelpInfo object that Get-Help returns. This parameter has no effect on displays of conceptual ("About_") help.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name <string>

Requests help about the specified tool or conceptual topic. Enter a cmdlet, provider, script, or function name, such as Get-Member, a conceptual topic name, such as "about_Objects", or an alias, such as "ls". Wildcards are permitted in cmdlet and provider names, but you cannot use wildcards to find the names of function help and script help topics.

To get help for a script that is not located in a path that is listed in the Path environment variable, type the path and file name of the script .

If you enter the exact name of a help topic, Get-Help displays the topic contents. If you enter a word or word pattern that appears in several help topic titles, Get-Help displays a list of the matching titles. If you enter a word that does not match any help topic titles, Get-Help displays a list of topics that include that word in their contents.

The names of conceptual topics, such as about_Objects, must be entered in English, even in non-English versions of Windows PowerShell.

Required?

false

Position?

1

Default Value

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Online

Displays the online version of a help topic in the default Internet browser. This parameter is valid only for cmdlet, function, and script help topics. You cannot use the Online parameter in a remote command.

Get-Help uses the Internet address (Uniform Resource Identifier [URI]) that appears in the first item of the Related Links section of a cmdlet, function, or script help topic. This parameter works only when the help topic includes a URI that begins with "Http" or "Https" and an Internet browser is installed on the system.

For information about supporting this feature in help topics that you write, see about_Comment_Based_Help, and see "How to Write Cmdlet Help" in the MSDN (Microsoft Developer Network) library at https://go.microsoft.com/fwlink/?LinkID=123415.

TROUBLESHOOTING NOTE: The Online parameter of the Get-Help cmdlet does not work correctly with German (de-DE) versions of Windows PowerShell help topics. This parameter is reserved for future use in German versions of Windows PowerShell.

Required?

false

Position?

named

Default Value

None

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Parameter <string>

Displays only the detailed descriptions of the specified parameters. Wildcards are permitted.

This parameter has no effect on displays of conceptual ("About_") help.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path <string>

Gets help that explains how the cmdlet works in the specified provider path. Enter a Windows PowerShell provider path.

This parameter gets a customized version of a cmdlet help topic that explains how the cmdlet works in the specified Windows PowerShell provider path. This parameter is effective only for help about a provider cmdlet and only when the provider includes a custom version of the provider cmdlet help topic.

To see the custom cmdlet help for a provider path, go to the provider path location and enter a Get-Help command or, from any path location, use the Path parameter of Get-Help to specify the provider path. For more information, see about_Providers.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Role <string[]>

Displays help customized for the specified user role. Enter a role. Wildcards are permitted.

Enter the role that the user plays in an organization. Some cmdlets display different text in their help files based on the value of this parameter. This parameter has no effect on help for the core cmdlets.

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs and Outputs

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet returns.

Inputs

None

You cannot pipe objects to this cmdlet.

Outputs

System.String or MamlCommandHelpInfo

If you request a conceptual topic, Get-Help returns it as a string. If you specify the name of a cmdlet,, function, or script, it returns a MamlCommandHelpInfo object. Otherwise, Get-Help returns one of the formatted views that are specified in the Help.Format.ps1xml file in the $pshome directory.

Notes

Without parameters, "Get-Help" displays information about the Windows PowerShell help system.

The full view of help (-full) includes a table of information about the parameters. The table includes the following fields:

-- Required: Indicates whether the parameter is required (true) or optional (false).

-- Position: Indicates whether the parameter is named or positional (numbered). Positional parameters must appear in a specified place in the command.

-- "Named" indicates that the parameter name is required, but that the parameter can appear anywhere in the command.

-- <Number> indicates that the parameter name is optional, but when the name is omitted, the parameter must be in the place specified by the number. For example, "2" indicates that when the parameter name is omitted, the parameter must be the second (2) or only unnamed parameter in the command. When the parameter name is used, the parameter can appear anywhere in the command.

-- Default value: The parameter value that Windows PowerShell uses if you do not include the parameter in the command.

-- Accepts pipeline input: Indicates whether you can (true) or cannot (false) send objects to the parameter through a pipeline. "By Property Name" means that the pipelined object must have a property with the same name as the parameter name.

-- Accepts wildcard characters: Indicates whether the value of a parameter can include wildcard characters, such as * and ?.

Example 1

C:\PS>get-help

Description
-----------
This command displays help about the Windows PowerShell help system.





Example 2

C:\PS>get-help *

Description
-----------
This command displays a list of all help files in the Windows PowerShell help system.





Example 3

C:\PS>get-help get-alias

C:\PS>help get-alias

C:\PS>get-alias -?

Description
-----------
These commands display basic information about the get-alias cmdlet. The "Get-Help" and "-?" commands display the information on a single page. The "Help" command displays the information one page at a time.





Example 4

C:\PS>get-help about_*

Description
-----------
This command displays a list of the conceptual topics included in Windows PowerShell help. All of these topics begin with the characters "about_". To display a particular help file, type "get-help <topic-name>, for example, "get-help about_signing".





Example 5

C:\PS>get-help ls -detailed

Description
-----------
This command displays detailed help for the Get-ChildItem cmdlet by specifying one of its aliases, "ls." The Detailed parameter requests the detailed view of the help file, which includes parameter descriptions and examples. To see the complete help file for a cmdlet, use the Full parameter.





Example 6

C:\PS>get-help format-string -full

Description
-----------
This command displays the full view help for the Format-String cmdlet. The full view of help includes parameter descriptions, examples, and a table of technical details about the parameters.





Example 7

C:\PS>get-help start-service -examples

Description
-----------
This command displays examples of using start-service in Windows PowerShell commands.





Example 8

C:\PS>get-help get-childitem -parameter f*

Description
-----------
This command displays descriptions of the parameters of the Get-ChildItem cmdlet that begin with "f" (filter and force). For descriptions of all parameters, type "get-help get-childitem parameter*".





Example 9

C:\PS>(get-help write-output).syntax

Description
-----------
This command displays only the syntax of the Write-Output cmdlet. 

Syntax is one of many properties of help objects; others are description, details, examples, and parameters. To find all properties and methods of help objects, type "get-help <cmdlet-name> | get-member"; for example, "get-help start-service | get member".





Example 10

C:\PS>(get-help trace-command).alertset

Description
-----------
This command displays the notes about the cmdlet. The notes are stored in the alertSet property of the help object.

The notes include conceptual information and tips for using the cmdlet. By default, the notes are displayed only when you use the Full parameter of Get-Help, but you can also display them by using the alertSet property.





Example 11

C:\PS>get-help add-member -full | out-string -stream | select-string -pattern clixml

Description
-----------
This example shows how to search for a word in particular cmdlet help topic. This command searches for the word "clixml" in the full version of the help topic for the Add-Member cmdlet. 

Because the Get-Help cmdlet generates a MamlCommandHelpInfo object, not a string, you need to use a command that transforms the help topic content into a string, such as Out-String or Out-File.





Example 12

C:\PS>get-help get-member -online

Description
-----------
This command displays the online version of the help topic for the Get-Member cmdlet.





Example 13

C:\PS>get-help remoting

Description
-----------
This command displays a list of topics that include the word "remoting" in their contents. 

When you enter a word that does not appear in any topic title, Get-Help displays a list of topics that include that word.





Example 14

C:\PS>get-help get-item -path SQLSERVER:\DataCollection

NAME
    Get-Item

SYNOPSIS
    Gets a collection of Server objects for the local computer and any computers to which you have made a SQL Server PowerShell connection.       
...

C:\PS> cd SQLSERVER:\DataCollection
C:\PS> SQLSERVER:\DataCollection> get-help get-item


NAME
    Get-Item

SYNOPSIS
    Gets a collection of Server objects for the local computer and any computers to which you have made a SQL Server PowerShell connection.       
...


C:\PS> Get-Item

NAME
    Get-Item

SYNOPSIS
    Gets the item at the specified location.

...

Description
-----------
This example shows how to get help for the Get-Item cmdlet that explains how to use the cmdlet in the DataCollection node of the Windows PowerShell SQL Server provider.

The example shows two ways of getting the custom help for Get-Item. 

The first command uses the Path parameter of Get-Help to specify the provider path. This command can be entered at any path location.

The second command uses the Set-Location cmdlet (alias = "cd") to go to the provider path. From that location, even without the Path parameter, the Get-Help command gets the custom help for the provider path.

The third command shows that a Get-Help command in a file system path, and without the Path parameter, gets the standard help for the Get-Item cmdlet.





Example 15

C:\PS>get-help c:\ps-test\MyScript.ps1

Description
-----------
This command gets help for the MyScript.ps1 script. For information about writing help for your functions and scripts, see about_Comment_Based_Help.





See Also

Concepts

about_Parameters
about_Comment_Based_Help
about_Command_Syntax
Get-Command
Get-PSDrive
Get-Member