Colors are cool ! What about giving our very own PowerShell Console some splash of colors.

HOW IT WORKS :

Access the BackgroundColor attribute of the $Host variable and change it as desired, like in the screenshot below.

NOTE : We are passing the Decimal value of the Colors in this attribute and Last value set by my function is 5 ( Five ) , which is the Default value of the PowerShell console (See below Screenshot). So that you don’t have to re adjust the Console colors after running the function.

SCRIPT :

Function Change-BackgroundColor($Color) { $Host.UI.RawUI.BackgroundColor = $Color cls Start-Sleep -Milliseconds 500 }

Hope you find it fun, #HappyThanksGiving to all readers !! 🙂