RestartUsbPort 1.2.1

Published by

RestartUsbPort is a command-line tool that permits you to restart any USB port when encountering issues eliminating the need to restart your machine.
RestartUsbPort is a command-line tool that permits you to restart any USB port when encountering issues eliminating the need to restart your machine.

This app is relatively straightforward, with no bells, no whistles, just a simple little tool to restart a USB port experiencing issues when attempting to use it. First off, you'll need to figure out which port(s) can be restarted. This procedure is listed below. Once you have that info, you can move on to restarting the port(s).

Usage is as follows:

RestartUsbPort [PortId] [-l] [-na] [-w:nnnn]
PortId can be
a device instance ID (in quotation marks because it contains the & char)
a driver key name
a device location info
a friendly device name (in quotation marks if it contains space or &)
a port chain in UsbTreeView style
-l lists USB ports that can be restarted
-na no about info
-w:nnnn waits nnnn milliseconds on end

Samples:

RestartUsbPort -l
RestartUsbPort "USB\VID_0781&PID_5580\AA010319131128161470"
RestartUsbPort {36fc9e60-c465-11cf-8056-444553540000}\0007
RestartUsbPort Port_#0002.Hub_#0008
RestartUsbPort "Sandisk Extreme"
RestartUsbPort 1-4-2

RestartUsbPort 1-4-2 -w:1000
If the & char is used in a parameter, then, if started from a command prompt or a BAT/CMD file, the whole parameter must be enclosed by quotation marks. Otherwise, the command processor interprets the & char as a separator for two separate commands.
Admin rights are required under Win 8 and 10 (or an active USBDLM command interface).

Returns Errorlevels:

0 - successfully restarted the USB port
1 - no parameters
2 - invalid parameters
3 - given ID not found or no device is attached to the port
4 - restart tried but failed

Similar:
What Is an SS USB Port?
USB Port Remains Active After Using Safely Remove Hardware
Device Requires Further Installation Error
How to Diagnose USB Problems
Please Insert a Disk Into Removable Disk Error
Windows Shuts Down When a USB Device Is Plugged In


  Download