tayopi
tayopi

Reputation: 313

Create alias for background color

Is there a way that I can set $Host.UI.RawUI.BackgroundColor to an alias so that I don't have to type the whole thing out every time?

Upvotes: 0

Views: 138

Answers (1)

TessellatingHeckler
TessellatingHeckler

Reputation: 29033

function bgc { param($color); $Host.UI.RawUI.BackgroundColor = $color }

C:\PS> bgc 'Red'

Add function to your PSProfile

Upvotes: 2

Related Questions