# How to change the Foreground color or Font color of the console using PowerShell?

PowerShellMicrosoft TechnologiesSoftware & Coding

#### Powershell for beginners

15 Lectures 3.5 hours

#### Learning Task Automation using Windows PowerShell

35 Lectures 2.5 hours

#### The Complete PowerShell 7 course: Beginner To Advanced

Most Popular

145 Lectures 12.5 hours

Font color is termed as the Foreground color in the PowerShell. To change the font color you can use the console GUI property “Screen Text”. There are various 16 colors available and you can change RGB properties as well.

## Command

To change the color with the script, use the below command.

\$Host.UI.RawUI.ForegroundColor = "Yellow"

## Output

You can see the immediate change in the Foreground color.

Updated on 23-Jan-2020 08:03:21