How could such a nice tool have such a terrible choice of colors for errors and warnings? I am talking about the ISE and the unreadable contrast of colors.
You can fix it. Open and update your profile by running this from your ISE (which opens your profile in NotePad)
# # Change the color of error and warning text # $opt = (Get-Host).PrivateData $opt.WarningBackgroundColor = "Orange" $opt.WarningForegroundColor = "white" $opt.ErrorBackgroundColor = "red" $opt.ErrorForegroundColor = "white"
Add the above to your profile. Save. Your ISE will have better colors for errors and warnings going forward (after a restart). For it to take effect immediately, just run it.
As a matter of fact, this is the color combination I have been using for a while and I cringe every time I see the default error/warning colors.
These colors are much better for Error and Warning – IMHO
|PS C:\Windows\system32> Write-Error “This is a test error to show the error colors!”
[0,0: Write-Error] This is a test error to show the error colors!
PS C:\Windows\system32> Write-Warning “This is a test warning to show the warning colors!”
WARNING: This is a test warning to show the warning colors!