PowerTip: Use PowerShell to list all possible colors in the console

Doctor Scripto

Summary: Use PowerShell and enumeration to access all possible colors that you can use in the console.

Hey, Scripting Guy! Question Is there a way to see all of the available colors that I can use when using Write-Host?

Hey, Scripting Guy! Answer We sure can! Why, with just one line in PowerShell, you’re all done! Here is an example:

[System.Enum]::getvalues([System.ConsoleColor])

The Doctor

0 comments

Discussion is closed.

Feedback usabilla icon