| description | Autogenerated Elements of Comment-Based Help |
|---|---|
| ms.date | 07/10/2023 |
| ms.topic | reference |
| title | Autogenerated Elements of Comment-Based Help |
The Get-Help cmdlet automatically generates several elements of a comment-based topic. These
autogenerated elements make comment-based help look very much like the help that's generated from
XML files.
The Get-Help cmdlet automatically generates the following elements of a help topic. You can't edit
these elements directly, but you can change the results by changing the source of the element.
The Name section of a function Help topic is taken from the function name in the function definition. The Name of a script Help topic is taken from the script filename. To change the name or its capitalization, change the function definition or the script filename.
The Syntax section of the Help topic is generated from the parameter list in the param statement
of the function or script. To add detail to the Help topic syntax, such as the .NET type of a
parameter, add the detail to the parameter list. If you don't specify a parameter type, the
Object type is inserted as the default value.
The Parameters section of the Help topic is generated from the parameter list in the function or
script and from the descriptions that you add using the .PARAMETER keyword or comments in the
parameter list.
Parameters appear in the Parameters section in the same order that they appear in the parameter
list. The spelling and capitalization of parameter names is also taken from the parameter list; it
isn't affected by the parameter name specified by the .PARAMETER keyword.
The common parameters are added to the syntax and parameter list of the Help topic, even if they have no effect. For more information about the common parameters, see about_CommonParameters.
Get-Help generates the table of parameter attributes that appears when you use the Full or
Parameter parameter of Get-Help. The value of the Required, Position, and Default
value attributes is taken from the function or script syntax.
The Remarks section of the Help topic is automatically generated from the function or script name. You can't change or affect its content.