Comment-Based Help PowerShell provides a mechanism for programmers to document their scripts using special comment directives. Comments using such syntax are called help comments. The cmdlet Get-Help (§13.19) generates documentation from these directives. Introduction A help comment contains a help directive of the form .name followed on one or more subsequent lines by the help content text. The help comment can be made up of a series of single-line-comments or a (§2.2.3). The set of comments comprising the documentation for a single entity is called a help topic. For example, # <help-directive-1> # <help-content-1> … # <help-directive-n> # <help-content-n> or <# <help-directive-1> <help-content-1> … <help-directive-n> <help-content-n> #> All of the lines in a help topic must be contiguous. If a help topic follows a comment that is not part of that topic, there must be at least one blank line between the two. The directives can appear in any order, and some of the directives may appear multiple times. Directive names are not case-sensitive. When documenting a function, help topics may appear in one of three locations: Immediately before the function definition with no more than one blank line between the last line of the function help and the line containing the function statement. Inside the function's body immediately following the opening curly bracket. Inside the function's body immediately preceding the closing curly bracket. When documenting a script file, help topics may appear in one of two locations: At the beginning of the script file, optionally preceded by comments and blank lines only. If the first item in the script after the help is a function definition, there must be at least two blank lines between
Comment-Based Help PowerShell provides a mechanism for programmers to document their scripts using special comment directives. Comments using such syntax are called help comments. The cmdlet Get-Help (§13.19) generates documentation from these directives. Introduction A help comment contains a help directive of the form .name followed on one or more subsequent lines by the help content text. The help comment can be made up of a series of single-line-comments or a (§2.2.3). The set of comments comprising the documentation for a single entity is called a help topic. For example, # <help-directive-1> # <help-content-1> … # <help-directive-n> # <help-content-n> or <# <help-directive-1> <help-content-1> … <help-directive-n> <help-content-n> #> All of the lines in a help topic must be contiguous. If a help topic follows a comment that is not part of that topic, there must be at least one blank line between the two. The directives can appear in any order, and some of the directives may appear multiple times. Directive names are not case-sensitive. When documenting a function, help topics may appear in one of three locations: Immediately before the function definition with no more than one blank line between the last line of the function help and the line containing the function statement. Inside the function's body immediately following the opening curly bracket. Inside the function's body immediately preceding the closing curly bracket. When documenting a script file, help topics may appear in one of two locations: At the beginning of the script file, optionally preceded by comments and blank lines only. If the first item in the script after the help is a function definition, there must be at least two blank lines between
PowerShell%202%200%20Language%20Specification.docx