How can I reset the powershell colors How can I reset the powershell colors powershell powershell

How can I reset the powershell colors


This resets the console colors (e.g., [Console]::BackgroundColor): (Paste in the powershell console)

[Console]::ResetColor()


I realize this is an old question, but I found it in Google and have another solution.

Set-PSReadlineOption -TokenKind Command -ForegroundColor Black

Source

This will change the input text to black. The available color choices are as follows:

  • Black
  • DarkBlue
  • DarkGreen
  • DarkCyan
  • DarkRed
  • DarkMagent
  • DarkYellow
  • Gray
  • DarkGray
  • Blue
  • Green
  • Cyan
  • Red
  • Magenta
  • Yellow
  • White

You can make this persist by adding it to your profile. It's enough to append the command to the end of the file.

In my case the profile is in: C:\Users\Billy\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

To get the location of your PS profile type:

$profile

If this file doesn't exist, you can create it with:

New-item –type fileforce $profile

(source)

To see the current settings in your profile, use:

Get-PSReadlineOption

(source)


The colors you see by right clicking on the title bar and clicking on Properties are actually stored in the shortcut file itself in the ExtraData section. You can just delete shortcut and recreate it, or you can use a hex editor to change the values. Outside of that, there is not "reset" feature. This is also true for the normal command prompt.

010 Editor Screenshot