How to disable and enable a USB port via command prompt?

How to disable and enable USB port via command prompt? Or using a batch script or VBScript? The OS is Windows 7.


Download utility devcon from Microsoft.

Then, use it as follows: List all known USB devices:

devcon find USB*

Disable USB device:

devcon disable "USB\VID_xxxx&PID_yyyy"

Enable USB device:

devcon enable "USB\VID_xxxx&PID_yyyy"