Copy-Item -ToSession progress bar. How to turn off?

Welcome Forums General PowerShell Q&A Copy-Item -ToSession progress bar. How to turn off?

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 8 months ago.

  • Author
  • #62623


    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.

  • #62625


    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

The topic ‘Copy-Item -ToSession progress bar. How to turn off?’ is closed to new replies.