NAME
Get-Help
SYNOPSIS
Displays information about Windows PowerShell commands and concepts.
SYNTAX
Get-Help [-Full] [[-Name] <string>] [-Category <string[]>] [-Component <string[]>] [-Functionality <string[]>] [-Online] [-Path <string>] [-Role <string[]>] [<CommonParameters>]
Get-Help [-Detailed] [[-Name] <string>] [-Category <string[]>] [-Component <string[]>] [-Functionality <string[]>] [-Online] [-Path <string>] [-Role <string[]>] [<CommonParameters>]
Get-Help [-Examples] [[-Name] <string>] [-Category <string[]>] [-Component <string[]>] [-Functionality <string[]>] [-Online] [-Path <string>] [-Role <string[]>] [<CommonParameters>]
Get-Help [-Parameter <string>] [[-Name] <string>] [-Category <string[]>] [-Component <string[]>] [-Functionality <string[]>] [-Online] [-Path <string>] [-Role <string[]>] [<CommonParameters>]
DESCRIPTION
The Get-Help cmdlet displays information about Windows PowerShell concepts and commands, including cmdlets, providers, Functions 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. These parameters have no effect on conceptual help topics.
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“.
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 [<SwitchParameter>]
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 [<SwitchParameter>]
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 [<SwitchParameter>]
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 [<SwitchParameter>]
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.
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 http://go.microsoft.com/fwlink/?LinkID=123415.
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: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
“Get-Help about_CommonParameters“.
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>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.
RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113316
about_Comment_Based_Help
Get-Command
Get-PSDrive
Get-Member