Question:
I want to disable syntax highlight on windows 10 power shell.
How I can do it?
There is no menu to disable it on preference.
Note that I using windows 10 (Anniversary updated)
Answer:
As by default syntax highlighting provided by PSReadline
module, then you need to remove PSReadline
module from your PowerShell session:
1 2 |
Remove-Module PSReadline |
or, if you want to use other
PSReadline
features (like persistent history) you can configure syntax highlighting to use same color for all kinds of tokens:
1 2 3 4 5 6 |
[Microsoft.PowerShell.TokenClassification].GetEnumValues() | % { $DefaultColor = (Get-PSReadlineOption).DefaultTokenForegroundColor } { Set-PSReadlineOption -TokenKind $_ -ForegroundColor $DefaultColor } |