Tuesday, January 20, 2009

write-warning = write-verbose = yellow

to display the message

PS> $WarningPreference = "Continue"

Write-Warning "Stopping SQL Service..."

or,

PS> $VerbosePreference = "Continue"

Write-Verbose -message "SQL Service has been started. You may proceed..."

(Yellow on Black if powershell.exe in V1.0 or above)
(Black on White if gpowershell.exe in V2CTP2)
(Black on White if powershell_ise.exe in V2CTP3)

No comments:

Post a Comment