change powershell command color
12,871
Solution 1
Regarding @LotPings answer, I solved my issue. The following command in powershell changed the command color from yellow to green:
Set-PSReadLineOption -colors @{ Command = "Green"}
Solution 2
You can also set an environment variable in the terminal settings:
Then edit your powershell profile and add something like this:
if ($env:CommandColor) {
Set-PSReadLineOption -colors @{ Command = $env:CommandColor}
}
Solution 3
Visite this Link to know how to change PowerShell command color.
Also, You can use Ohmyz for customizing your PowerShell also they have some awesome plugins and themes
![wero026](https://lh4.googleusercontent.com/-1unlNvjFVZ8/AAAAAAAAAAI/AAAAAAAAAAA/APUIFaOjvQZSz2uV_6SEuuf0pNmq19HPYg/mo/photo.jpg?sz=256)
Author by
wero026
Updated on June 25, 2022Comments
-
wero026 about 2 years
How do I change the command color in powershell? Currently it is yellow and when I use powershell nested in Intellij, I can't read the yellow command on white background.
-
wero026 about 5 yearsAnd which entry I have to change? I tried $host.UI.RawUI.ForegroundColor, but the ugly yellow still remains
-
Antu about 5 yearsI'm on Linux right now so I cannot help you about that appropriate $host name but you may try Ohmyz and also it have greate thems
-
L. F. about 5 yearsIt would be nice if you add some explanation along with your code.
-
LordWilmore about 5 yearsWhilst this solution may work, it is always useful to add some commentary explaining your answer and which part in particular resolves the original stated problem.