我正在尝试设置我的 PowerShell 命令,因此Get-Help -full
它将显示有关如何运行我的脚本的完整信息。我有要在此帮助中显示的默认值。我有以下内容:
<#
.PARAMETER SenderEmail
The name of the user who is sending the email message. Although not
officially required, it will be checked to make sure it's not blank.
#>
Param (
[String]
[Parameter(
Position=1,
HelpMessage="Sender's Email Address")]
$SenderEmail = "bob@fubar.com"
)
然而,当我输入 Get-Help -detail 时,会显示以下内容。
-SenderEmail <String>
The name of the user who is sending the email message. Although not
officially required, it will be checked to make sure it's not blank.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters?
如何获得显示此参数默认值的帮助?