11---
22description : Comment-Based Help Keywords
3- ms.date : 05/21 /2025
3+ ms.date : 09/22 /2025
44no-loc : [FAQ, Function, General, Glossary, Provider, Component, Functionality, Role]
55title : Comment-Based Help Keywords
66---
@@ -20,105 +20,96 @@ when it can't find a help file that matches the value of the keyword.
2020
2121## ` .SYNOPSIS `
2222
23- A brief description of the function or script. This keyword can be used only
24- once in each topic.
23+ A brief description of the function or script. This keyword can be used only once in each topic.
2524
2625## ` .DESCRIPTION `
2726
28- A detailed description of the function or script. This keyword can be used only
29- once in each topic.
27+ A detailed description of the function or script. This keyword can be used only once in each topic.
3028
3129## ` .PARAMETER <Parameter-Name> `
3230
33- The description of a parameter. You can include a ` .PARAMETER ` keyword for each
34- parameter in the function or script.
31+ The description of a parameter. You can include a ` .PARAMETER ` keyword for each parameter in the
32+ function or script.
3533
36- The ` .PARAMETER ` keywords can appear in any order in the comment block, but the
37- order in which the parameters appear in the ` param ` statement or function
38- declaration determines the order in which the parameters appear in Help topic.
39- To change the order of parameters in the Help topic, change the order of the
40- parameters in the ` param ` statement or function declaration.
34+ The ` .PARAMETER ` keywords can appear in any order in the comment block, but the order in which the
35+ parameters appear in the ` param ` statement or function declaration determines the order in which the
36+ parameters appear in Help topic. To change the order of parameters in the Help topic, change the
37+ order of the parameters in the ` param ` statement or function declaration.
4138
42- You can also specify a parameter description by placing a comment in the
43- ` param ` statement immediately before the parameter variable name. If you use
44- both a ` param ` statement comment and a ` .PARAMETER ` keyword, the description
45- associated with the ` .PARAMETER ` keyword is used, and the ` param ` statement
46- comment is ignored.
39+ You can also specify a parameter description by placing a comment in the ` param ` statement
40+ immediately before the parameter variable name. If you use both a ` param ` statement comment and a
41+ ` .PARAMETER ` keyword, the description associated with the ` .PARAMETER ` keyword is used, and the
42+ ` param ` statement comment is ignored.
4743
4844## ` .EXAMPLE `
4945
50- A sample command that uses the function or script, optionally followed by
51- sample output and a description. Repeat this keyword for each example.
46+ A sample command that uses the function or script, optionally followed by sample output and a
47+ description. Repeat this keyword for each example.
5248
5349## ` .INPUTS `
5450
55- The .NET types of objects that can be piped to the function or script. You can
56- also include a description of the input objects. Repeat this keyword for each
57- input type.
51+ The .NET types of objects that can be piped to the function or script. You can also include a
52+ description of the input objects. Repeat this keyword for each input type.
5853
5954## ` .OUTPUTS `
6055
61- The .NET type of the objects that the cmdlet returns. You can also include a
62- description of the returned objects. Repeat this keyword for each output type.
56+ The .NET type of the objects that the cmdlet returns. You can also include a description of the
57+ returned objects. Repeat this keyword for each output type.
6358
6459## ` .NOTES `
6560
6661Additional information about the function or script.
6762
6863## ` .LINK `
6964
70- The name of a related topic. Repeat this keyword for each related topic. This
71- content appears in the Related Links section of the Help topic.
65+ The name of a related topic. Repeat this keyword for each related topic. This content appears in the
66+ Related Links section of the Help topic.
7267
73- The ` .LINK ` keyword content can also include a Uniform Resource Identifier
74- (URI) to an online version of the same help topic. The online version opens
75- when you use the ** Online** parameter of ` Get-Help ` . The URI must begin with
76- ` http ` or ` https ` .
68+ The ` .LINK ` keyword content can also include a Uniform Resource Identifier (URI) to an online
69+ version of the same help topic. The online version opens when you use the ** Online** parameter of
70+ ` Get-Help ` . The URI must begin with ` http ` or ` https ` .
7771
7872## ` .COMPONENT `
7973
80- The name of the technology or feature that the function or script uses, or to
81- which it's related. The ** Component** parameter of ` Get-Help ` uses this value
82- to filter the search results returned by ` Get-Help ` .
74+ The name of the technology or feature that the function or script uses, or to which it's related.
75+ The ** Component** parameter of ` Get-Help ` uses this value to filter the search results returned by
76+ ` Get-Help ` .
8377
8478## ` .ROLE `
8579
86- The name of the user role for the help topic. The ** Role** parameter of
87- ` Get-Help ` uses this value to filter the search results returned by ` Get-Help ` .
80+ The name of the user role for the help topic. The ** Role** parameter of ` Get-Help ` uses this value
81+ to filter the search results returned by ` Get-Help ` .
8882
8983## ` .FUNCTIONALITY `
9084
91- The keywords that describe the intended use of the function. The
92- ** Functionality** parameter of ` Get-Help ` uses this value to filter the search
93- results returned by ` Get-Help ` .
85+ The keywords that describe the intended use of the function. The ** Functionality** parameter of
86+ ` Get-Help ` uses this value to filter the search results returned by ` Get-Help ` .
9487
9588## ` .FORWARDHELPTARGETNAME <Command-Name> `
9689
97- Redirects to the help topic for the specified command. You can redirect users
98- to any help topic, including help content for a function, script, cmdlet, or
99- provider.
90+ Redirects to the help topic for the specified command. You can redirect users to any help topic,
91+ including help content for a function, script, cmdlet, or provider.
10092
10193``` powershell
10294# .FORWARDHELPTARGETNAME <Command-Name>
10395```
10496
10597## ` .FORWARDHELPCATEGORY `
10698
107- Specifies the help category of the item in ` .FORWARDHELPTARGETNAME ` . Valid
108- values are ` Alias ` , ` Cmdlet ` , ` HelpFile ` , ` Function ` , ` Provider ` , ` General ` ,
109- ` FAQ ` , ` Glossary ` , ` ScriptCommand ` , ` ExternalScript ` , ` Filter ` , or ` All ` . Use
110- this keyword to avoid conflicts when there are commands with the same name.
99+ Specifies the help category of the item in ` .FORWARDHELPTARGETNAME ` . Valid values are ` Alias ` ,
100+ ` Cmdlet ` , ` HelpFile ` , ` Function ` , ` Provider ` , ` General ` , ` FAQ ` , ` Glossary ` , ` ScriptCommand ` ,
101+ ` ExternalScript ` , ` Filter ` , or ` All ` . Use this keyword to avoid conflicts when there are commands
102+ with the same name.
111103
112104``` powershell
113105# .FORWARDHELPCATEGORY <Category>
114106```
115107
116108## ` .REMOTEHELPRUNSPACE <PSSession-variable> `
117109
118- Specifies a session that contains the help topic. Enter a variable that
119- contains a ** PSSession** object. This keyword is used by the
120- [ Export-PSSession] [ 09 ] cmdlet to find the help content for the exported
121- commands.
110+ Specifies a session that contains the help topic. Enter a variable that contains a ** PSSession**
111+ object. This keyword is used by the [ Export-PSSession] [ 09 ] cmdlet to find the help content for the
112+ exported commands.
122113
123114``` powershell
124115# .REMOTEHELPRUNSPACE <PSSession-variable>
@@ -132,31 +123,26 @@ Specifies an XML-based help file for the script or function.
132123# .EXTERNALHELP <XML Help File>
133124```
134125
135- The ` .EXTERNALHELP ` keyword is required when a function or script is documented
136- in XML files. Without this keyword, ` Get-Help ` can't find the XML-based help
137- file for the function or script.
138-
139- The ` .EXTERNALHELP ` keyword takes precedence over other comment-based help
140- keywords. If ` .EXTERNALHELP ` is present, ` Get-Help ` doesn't display
141- comment-based help, even if it can't find a help topic that matches the value
142- of the ` .EXTERNALHELP ` keyword.
143-
144- If the function is exported by a module, set the value of the ` .EXTERNALHELP `
145- keyword to a filename without a path. ` Get-Help ` looks for the specified file
146- name in a language-specific subdirectory of the module directory. There are no
147- requirements for the name of the XML-based help file for a function, but a best
148- practice is to use the following format:
149-
150- ``` Syntax
151- <ScriptModule.psm1>-help.xml
152- ```
153-
154- If the function isn't included in a module, include a path to the XML-based
155- help file. If the value includes a path and the path contains
156- UI-culture-specific subdirectories, ` Get-Help ` searches the subdirectories
157- recursively for an XML file with the name of the script or function in
158- accordance with the language fallback standards established for Windows, just
159- as it does in a module directory.
126+ The ` .EXTERNALHELP ` keyword is required when a function or script is documented in XML files.
127+ Without this keyword, ` Get-Help ` can't find the XML-based help file for the function or script.
128+
129+ The ` .EXTERNALHELP ` keyword takes precedence over other comment-based help keywords. If
130+ ` .EXTERNALHELP ` is present, ` Get-Help ` doesn't display comment-based help, even if it can't find a
131+ help topic that matches the value of the ` .EXTERNALHELP ` keyword.
132+
133+ If the function is exported by a module, set the value of the ` .EXTERNALHELP ` keyword to a filename
134+ without a path. ` Get-Help ` looks for the specified filename in a language-specific subdirectory of
135+ the module directory. There are no requirements for the name of the XML-based help file for a
136+ function. Beginning in PowerShell 5.0, functions that are exported by a module can be documented in
137+ a help file that's named for the module. You don't need to use ` .EXTERNALHELP ` comment keyword. For
138+ example, if the ` Test-Function ` function is exported by the ` MyModule ` module, you can name the help
139+ file ` MyModule-help.xml ` . The ` Get-Help ` cmdlet looks for help for the ` Test-Function ` function in
140+ the ` MyModule-help.xml ` file in the module directory.
141+
142+ If the function isn't included in a module, include a path to the XML-based help file. If the value
143+ includes a path and the path contains UI-culture-specific subdirectories, ` Get-Help ` searches the
144+ subdirectories recursively for an XML file with the name of the script or function in accordance
145+ with the language fallback standards established for Windows, just as it does in a module directory.
160146
161147For more information about the cmdlet help XML-based help file format, see
162148[ How to Write Cmdlet Help] [ 01 ] .
0 commit comments