Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Set the color of the progress bar with PowerShell

$
0
0

Summary: Use the $Host object to alter the color of the progress bar in PowerShell.

Hey, Scripting Guy! Question I was curious if there’s a way to change the color of the progress bar in PowerShell. Do you know how this could be done?

Hey, Scripting Guy! Answer Glad you asked! You can do this by altering the values for ProgressBackGroundColor and ProgressForegroundColor under $Host.PrivateData.

To change to a bright green background with a black foreground, use the following code in PowerShell:

$Host.PrivateData.ProgressBackgroundColor=’Green’
$Host.PrivateData.ProgressForegroundColor=’Black’

The Doctor


Viewing all articles
Browse latest Browse all 3333

Trending Articles