Search notes:

PowerShell - $Host.UI.RawUI: BackgroundColor and ForegroundColor

The two properties backgroundColor and foregroundColor of the $host.ui.rawUI allow to define the foreground and background color when text is written to a PowerShell host's console.
The values of these properties are overwritten by the value of the color properties of psReadLineOption.
The colors that are used for the result of a command are defined by the console's fore- and background color.
The type of these properties is System.ConsoleColor.

See also

The colors for the various write-* cmdlets (write-error etc.) can be set in the $host.privateData object.

Index