Reset USB devices - Windows

Prerequisites:

  • You need to be able to run PowerShell as an administrator

  • You need to set your PowerShell execution policy to a permissive value or be able to bypass it:

    PS> Set-ExecutionPolicy Unrestricted

Steps:

  1. Launch Windows PowerShell as an Administrator, and wait for the PS> prompt to appear

  2. Navigate within PowerShell to the directory where the script lives:

    PS> cd C:\my_path\ (enter)
  3. Execute the script:

    PS> .\restart-usb-devices.ps1 (enter)

Or: you can run the PowerShell script from the Command Prompt (cmd.exe) like this:

Script - restart-usb-devices.ps1