- PSReadLine and $PSStyle allow full palettes for tokens and formatted output.
- The ISE exposes $psISE.Options for colors, fonts, and quick restore.
- Accessibility requires a 4.5:1 contrast ratio; adjust Selection, Keyword, and String.
- Make profile changes persistent and use Write-Host for timely notifications.
If you work with your console every day, you've probably considered adjusting the colors to make text clearer or simply to make the environment more pleasant. PowerShell allows you to customize background, text colors and styles both from the console itself and through specific modules and objects, and even save that configuration to make it permanent.
In addition to quick settings from the interface, PowerShell incorporates PSReadLine and, since 7.2, the variable $PSStyle to colorize syntax tokens and formatted output. If you use light themes, it is advisable to redefine colors because the default palette is designed for dark backgrounds and some shades may become illegible.
View and understand your current settings with PSReadLine
Before touching anything, it's a good idea to inspect what's active. Get-PSReadLineOption displays the edit mode, history, and palette applied to each PSReadLine token type, among other options.
Get-PSReadLineOption
The result includes many details. Among the most useful are the colors per token and the ANSI sequences in force for a terminal with dark background (typical default values):
EditMode : Windows
AddToHistoryHandler : System.Func`2
HistoryNoDuplicates : True
HistorySavePath : C:\Users\user1\AppData\Roaming\Microsoft\Wind...
HistorySaveStyle : SaveIncrementally
HistorySearchCaseSensitive : False
HistorySearchCursorMovesToEnd : False
MaximumHistoryCount : 4096
ContinuationPrompt : >>
ExtraPromptLineCount : 0
PromptText : {> }
BellStyle : Audible
DingDuration : 50
DingTone : 1221
CommandsToValidateScriptBlockArguments : {ForEach-Object, %, Invoke-Command, icm...}
CompletionQueryItems : 100
MaximumKillRingCount : 10
ShowToolTips : True
ViModeIndicator : None
WordDelimiters : ;:,.[]{}()/\|^&*-=+'"-—―
AnsiEscapeTimeout : 100
PredictionSource : HistoryAndPlugin
PredictionViewStyle : Inline
ViewCommandColor : "`e = "`e = "`e = "`e = "`e = 'red'
$psISE.Options.RestoreDefaultConsoleTokenColors()
- RestoreDefaults() (ISE 2.0+): Returns all Console panel options to factory settings and resets notifications.
# Cambia el fondo de la Consola y restaura $psISE.Options.ConsolePaneBackgroundColor = 'orange' $psISE.Options.RestoreDefaults() - RestoreDefaultTokenColors() (ISE 2.0+): Resets panel token colors Script.
# Cambia el color de comentarios y restaura $psISE.Options.TokenColors = 'red' $psISE.Options.RestoreDefaultTokenColors() - RestoreDefaultXmlTokenColors() (ISE 3.0+): Restores token colors for XML displayed in ISE.
# Cambia comentarios en XML y restaura $psISE.Options.XmlTokenColors = 'red' $psISE.Options.RestoreDefaultXmlTokenColors()
Key properties for colors, typography, and behavior
Below is a complete selection of ISEOptions properties to control the appearance and experience. You can assign color names, hex, or System.Windows.Media.Color depending on the case:
- AutoSaveMinuteInterval (ISE 3.0+): Minutes between autosaves. Default is 2.
$psISE.Options.AutoSaveMinuteInterval = 3 - CommandPaneBackgroundColor (ISE 2.0): Command panel background color.
$psISE.Options.CommandPaneBackgroundColor = 'orange' - CommandPaneUp (ISE 2.0): Place the panel Commandos up or not.
$psISE.Options.CommandPaneUp = $true - ConsolePaneBackgroundColor (ISE 3.0+): Console panel background.
$psISE.Options.ConsolePaneBackgroundColor = 'red' - ConsolePaneForegroundColor (ISE 3.0+): Console panel text color.
$psISE.Options.ConsolePaneForegroundColor = 'yellow' - ConsolePaneTextBackgroundColor (ISE 3.0+): Console text background.
$psISE.Options.ConsolePaneTextBackgroundColor = 'pink' - ConsoleTokenColors (ISE 3.0+): Token-color dictionary for IntelliSense in the Console; tokens such as Attribute, Command, Keyword, String, Variable, etc.
$psISE.Options.ConsoleTokenColors = 'green' $psISE.Options.ConsoleTokenColors = 'magenta' - DebugBackgroundColor (ISE 2.0+): Debug text background.
$psISE.Options.DebugBackgroundColor = '#0000FF' - DebugForegroundColor (ISE 2.0+): Close-up of debug text.
$psISE.Options.DebugForegroundColor = 'yellow' - DefaultOptions (ISE 2.0+): Collection with default values; useful for inspection.
$psISE.Options.DefaultOptions - ErrorBackgroundColor (ISE 2.0+): Error text background in Console.
$psISE.Options.ErrorBackgroundColor = 'black' - ErrorForegroundColor (ISE 2.0+): Error text color in Console.
$psISE.Options.ErrorForegroundColor = 'green' - FontName (ISE 2.0+): Font used in Script and Console. For font recommendations, see choose the best font.
$psISE.Options.FontName = 'Courier New' - FontSize (ISE 2.0+): Font size (8–32) for Script, Commands and Output.
$psISE.Options.FontSize = 20 - IntellisenseTimeoutInSeconds (ISE 3.0+): IntelliSense waiting time for resolution (default 3).
$psISE.Options.IntellisenseTimeoutInSeconds = 5 - MruCount (ISE 3.0+): Number of recent files in the Open menu (default 10).
$psISE.Options.MruCount = 5 - OutputPaneBackgroundColor (ISE 2.0): Output panel background color.
$psISE.Options.OutputPaneForegroundColor = 'gold' - OutputPaneTextForegroundColor (ISE 2.0): Text foreground in Output.
$psISE.Options.OutputPaneTextForegroundColor = 'blue' - OutputPaneTextBackgroundColor (ISE 2.0): Text background in Output.
$psISE.Options.OutputPaneTextBackgroundColor = 'pink' - ScriptPaneBackgroundColor (ISE 2.0+): Script panel background.
$psISE.Options.ScriptPaneBackgroundColor = 'yellow' - ScriptPaneForeGroundColor (ISE 2.0+): Foreground on non-script files in the Script panel.
$psISE.Options.ScriptPaneBackgroundColor = 'green' - SelectedScriptPaneState (ISE 2.0+): Script panel position: “Top”, “Right” or “Maximized”.
$psISE.Options.SelectedScriptPaneState = 'Top' $psISE.Options.SelectedScriptPaneState = 'Right' $psISE.Options.SelectedScriptPaneState = 'Maximized' - ShowDefaultSnippets (ISE 3.0+): Show or hide snippets by default on Ctrl+J.
$psISE.Options.ShowDefaultSnippets = $false - ShowIntellisenseInConsolePane (ISE 3.0+): Enable IntelliSense suggestions in Console.
$psISE.Options.ShowIntellisenseInConsolePane = $false - ShowIntellisenseInScriptPane (ISE 3.0+): Enable IntelliSense in Script.
$psISE.Options.ShowIntellisenseInScriptPane = $false - ShowLineNumbers (ISE 3.0+): Line numbers in the Script panel.
$psISE.Options.ShowLineNumbers = $false - ShowOutlining (ISE 3.0+): Code folding/unfolding in Script.
$psISE.Options.ShowOutlining = $false - ShowToolBar (ISE 2.0+): Show the ISE toolbar.
$psISE.Options.ShowToolBar = $true - ShowWarningBeforeSavingOnRun (ISE 2.0+): Warning before saving on run.
$psISE.Options.ShowWarningBeforeSavingOnRun = $true - ShowWarningForDuplicateFiles (ISE 2.0+): Warning when opening the same file in multiple tabs.
$psISE.Options.ShowWarningForDuplicateFiles = $true - TokenColors (ISE 2.0+): Token-color dictionary for IntelliSense in Script (Attribute, Command, Keyword, etc.).
$psISE.Options.TokenColors = 'green' $psISE.Options.TokenColors = 'magenta' - UseEnterToSelectInConsolePaneIntellisense (ISE 3.0+): Use Enter to select in Console IntelliSense.
$psISE.Options.UseEnterToSelectInConsolePaneIntellisense = $false - UseEnterToSelectInScriptPaneIntellisense (ISE 3.0+): Use Enter to select in Script IntelliSense.
$psISE.Options.UseEnterToSelectInConsolePaneIntellisense = $true - UseLocalHelp (ISE 3.0+): F1 opens local or online help.
$psISE.Options.UseLocalHelp = $false $psISE.Options.UseLocalHelp = $true - VerboseBackgroundColor (ISE 2.0+): Verbose text background.
$psISE.Options.VerboseBackgroundColor = '#0000FF' - VerboseForegroundColor (ISE 2.0+): Verbose text foreground.
$psISE.Options.VerboseForegroundColor = 'yellow' - WarningBackgroundColor (ISE 2.0+): Warning text background.
$psISE.Options.WarningBackgroundColor = '#0000FF' - WarningForegroundColor (ISE 2.0+): Close-up of the warning text.
$psISE.Options.WarningForegroundColor = 'yellow' - XmlTokenColors (ISE 3.0+): Token-color dictionary for XML content.
$psISE.Options.XmlTokenColors = 'green' $psISE.Options.XmlTokenColors = 'magenta' - Zoom (ISE 3.0+): Relative text size (20–400; default 100).
$psISE.Options.Zoom = 200
You can also view a snapshot of the default ISE configuration. It will show you fonts, colors and token dictionaries as standard, useful for comparison.
$psISE.Options.DefaultOptions
Change colors from the Windows interface (CMD and PowerShell)
If you prefer not to touch scripts, you can also adjust colors from the window itself. Right click on the title bar de CMD or PowerShell, choose Properties and open the Colors tab.
Set wallpaper and lock screen with PowerShell
Beyond the console colors, it is possible to set the desktop background via script, even change the login background from script. There are guides for Windows Server 2012 R2/2016/2019 and Windows 10/7 showing how to do it from PowerShell, which is useful for automation.
In managed environments (for example, with Intune), you could package a script that pins an image or a slideshow from a folder (e.g. C:\\temp\\slideshowtest). This is a common scenario and can be automated via distribution as an application.
Colorize quick messages with Write-Host
For quick output, Write-Host allows you to color the foreground and background on the fly. It is ideal for highlighting warnings or errors. in scripts without getting into PSReadLine.
Write-Host "Operación completada" -ForegroundColor Green
Write-Host "Atención" -ForegroundColor Yellow -BackgroundColor DarkBlue
Write-Host "Error" -ForegroundColor Red -BackgroundColor Black
The list of supported colors is extensive (for example, Black, DarkBlue, DarkGreen, DarkCyan, DarkRed, DarkMagenta, DarkYellow, Gray, DarkGray, Blue, Green, Cyan, Red, Magenta, Yellow, White) and allows you a minimum of visual coherence without further dependencies.
Practical tips for a usable palette
Don't just aim for "pretty." Prioritize readability. Avoid combining saturated tones on both planes and check the contrast with a reliable tool. The goal is to keep your console comfortable for hours.
Also check the selection color and prediction/IntelliSense highlighting. A Selection with good contrast and a ListPredictionSelected that doesn’t “eat” the text make a difference in productivity.
Colors by project or by machine? Profiles to the rescue.
If you switch between machines or user profiles, it pays to centralize your settings. Save your $ISETheme and $PSStyle settings to your profile and version the file (for example, with Git) to keep them in sync.
On shared or multi-user computers, consider splitting between the AllUsers profile and the User profile. This is how you separate the global from the personal and avoid surprises when you change sessions.
Rapid diagnosis: Why does light look bad?
Remember that the default PSReadLine and $PSStyle palette is designed for dark backgrounds. In light subject, many light tones in the foreground They go unnoticed. Check Comment, String, Keyword, Member, and Variable, which often clash in clearings.
If the problem is the output color of native cmdlets (for example, table headers), check $PSStyle.Formatting.* and the colors defined for directories, symbolic links, executables and extensions in $PSStyle.FileInfo.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.