According to TechNet one of the keywords for the comment-based help is .Notes
. But when I include this keyword the corresponding help text is not displayed.
My script:
<#
.DESCRIPTION
This describes the script.
.NOTES
This is a note about the script.
#>
"Hello world"
Output of Get-Help:
PS E:\> Get-Help .\Test-Script.ps1
NAME
E:\Test-Script.ps1
SYNOPSIS
SYNTAX
E:\Test-Script.ps1 [<CommonParameters>]
DESCRIPTION
This describes the script.
RELATED LINKS
REMARKS
To see the examples, type: "get-help E:\Test-Script.ps1 -examples".
For more information, type: "get-help E:\Test-Script.ps1 -detailed".
For technical information, type: "get-help E:\Test-Script.ps1 -full".
I know the .Notes keyword is being recognized because if I misspell it, say as ".NotesX", running Get-Help doesn't return any custom help:
PS E:> Get-Help .\Test-Script.ps1
Test-Script.ps1
I looked for a custom switch that Get-Help might require before displaying this section, like the -example
shows the content from the .Example keyword(s), but didn't find one. I'm trying this on PowerShell v5.1.
How can I get the .Notes section to display when Get-Help is run?