Muliple Foreground Colors in Powershell in One Command.
Posted
by Mark Tomlin
on Stack Overflow
See other posts from Stack Overflow
or by Mark Tomlin
Published on 2010-04-22T06:01:23Z
Indexed on
2010/04/22
6:03 UTC
Read the original article
Hit count: 301
powershell
|color
I want to output many different foreground colors with one statement.
PS C:\> Write-Host "Red" -ForegroundColor Red
Red
This output is red.
PS C:\> Write-Host "Blue" -ForegroundColor Blue
Blue
This output is blue.
PS C:\> Write-Host "Red", "Blue" -ForegroundColor Red, Blue
Red Blue
This output is magenta, but I want the color to be Red for the word red, and blue for the word blue via the one command. How can I do that?
© Stack Overflow or respective owner