PowerTip: Change Color of PowerShell Errors


Summary: Learn how to change the color of Windows PowerShell errors.

Hey, Scripting Guy! Question How can I change the color of Windows PowerShell errors in the Windows PowerShell console?

Hey, Scripting Guy! Answer Use $host.PrivateData and supply a new value for ErrorForegroundColor, for example:

$Host.PrivateData.ErrorForegroundColor = 'white'

Comments (2)

Skip to main content