Reputation: 57302
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
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