我想設置我的PowerShell命令,所以Get-Help -full
將顯示關於如何運行腳本的完整信息。我有默認值,我想在這個幫助中顯示。我有以下內容: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 = "[email protected]"
)
但是,當我輸入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?
如何獲得顯示該參數默認值的幫助?
感謝您的答覆指出。我想我們會在升級到Windows 7時看到它。 – 2012-04-11 18:31:15