Paolo Tedesco
Paolo Tedesco

Reputation: 57302

PowerShell: suppress Write-Progress output

I have a PowerShell script that calls a CmdLet which in turn reports its progress using Write-Progress, and I would like to hide the progress bar.
In is it possible to suppress or redirect the output of the Write-Progress CmdLet?

Upvotes: 9

Views: 3531

Answers (1)

Keith Hill
Keith Hill

Reputation: 202092

Try setting this preference variable before calling the cmdlet that utilizes Write-Progress:

$ProgressPreference = 'SilentlyContinue'

You may want to revert back to 'Continue' afterwards.

Upvotes: 15

Related Questions