Reputation: 81
My eyes have a hard-time seeing the rainbow of colors that powershell uses. I need to somehow get a powershell terminal window to display everything (aka, error messages, syntax, output, etc.) with black text on a white background. AND I need to have this happen in an Azure Cloud Shell and "stick" (meaning if I exit the cloud-shell and come back into it, the terminal window is automagically setup correctly).
Is this doable? Can someone point me to a script or the correct commands to do this? OR maybe point me to some accessibility setting?
Upvotes: 1
Views: 4082
Reputation: 409
Another option is to change the application program theme of appearance into Bright mode. Then I can see black color text and white color background.
Upvotes: 0
Reputation: 1
OP asked for Black & White, not other colors for errors.
Here you are :
## NO colored syntax thank you.
$console = $host.ui.rawui
$console.backgroundcolor = "black"
$console.foregroundcolor = "white"
$colors = $host.privatedata
$colors.verbosebackgroundcolor = "Black"
$colors.verboseforegroundcolor = "White"
$colors.warningbackgroundcolor = "Black"
$colors.warningforegroundcolor = "White"
$colors.Errorbackgroundcolor = "Black"
$colors.Errorforegroundcolor = "White"
set-location C:\
clear-host
Upvotes: 0
Reputation: 69
First you need a profile to edit:
if ($false -eq (Test-Path $profile)){New-Item $profile -type file}
next you can open it in notepad
& notepad $profile
or vscode
& code $profile
and save the following as your profile:
$console = $host.ui.rawui
$console.backgroundcolor = "black"
$console.foregroundcolor = "white"
$colors = $host.privatedata
$colors.verbosebackgroundcolor = "Black"
$colors.verboseforegroundcolor = "Green"
$colors.warningbackgroundcolor = "Red"
$colors.warningforegroundcolor = "white"
$colors.ErrorBackgroundColor = "Yellow"
$colors.ErrorForegroundColor = "Red"
set-location C:\
clear-host
Upvotes: 0