I"m using Windows PowerShell on Windows 10. Although I have been able to adjust background and most foreground colors,
I can't seem to figure out how to turn off syntax highlighting or change the colors
Where is this setting located?
I"m using Windows PowerShell on Windows 10. Although I have been able to adjust background and most foreground colors,
I can't seem to figure out how to turn off syntax highlighting or change the colors
Where is this setting located?
The dynamic syntax highlighting comes from the PSReadLine module that ships with PowerShell in Windows 10.
You can "reset" all the token colors to whatever the console host application uses:
# Prepare a dictionary to hold all the new token-color mappings
$colorMap = @{}
# Fetch the possible coloring options
Get-PSReadLineOption |Get-Member *Color -MemberType Property |ForEach-Object {
# Add a mapping to our dictionary that overrides the existing setting with whatever foreground color is used by the console
$colorMap[$_.Name -replace 'Color$'] = [Console]::ForegroundColor
}
# Use the dictionary to update the highlighting settings
Set-PSReadLineOption -Colors $colorMap