It turns out quite easy. Below is an example.
$DebuggingColor = [System.ConsoleColor]::DarkGreen
$HighlightColor = [System.ConsoleColor]::Green
$WarningColor = [System.ConsoleColor]::Yellow
$ErrorColor = [System.ConsoleColor]::Red
Write-Host "hello world" -f $DebuggingColor
Reference:
https://leftlobed.wordpress.com/2008/05/31/setting-powershell-console-color-when-running-elevated/
No comments:
Post a Comment