Changing Screen Colours

Changing screen colours can be easily done using the .NET [Console] object with commands similar to below:

[Console]::ForegroundColor = "yellow"
[Console]::BackgroundColor = "red"

After changing the background a Clear-Host  command should be issued.

To put the colours back to the default issue the following command:
[Console]::ResetColor()

Again, if you have previously changed the background colour and are reverting it you will need to run Clear-Host

Leave a Reply

Your email address will not be published. Required fields are marked *