Is there a way to suppress the progress bar that appears when using Copy-Item cmdlet with -ToSession switch? I have my own custom progress bar in script and these blinking pop-up windows are useless and annoying when copying a large amount of small files over PSRemoting session.
Hello, Mark!
There is the $ProgressPreference variable, you can learn more about it in:
Get-Help about_Preference_Variables
So you can do this:
$ProgressPreference = 'SilentlyContinue' # hide the progress bar # ...your code... $ProgressPreference = 'Continue' # restore the default value if you need