title: Programmatically restart USB device in Windows
body: <p>Some software I am developing requires the presence of a USB device (which I interact with as a SerialPort, with a USB-to-UART bridge).</p>
  
  <p>Sometimes, after a computer is being restarted from hibernation, the device is not being detected, and I can no longer write to, or read from, the device through its serial port. Having read/write access to the device is necessary.</p>
  
  <p>I cannot rely on the user to take any action (physical or otherwise), so I need a way to restart the device programmatically.</p>
  
  <p><strong>How should I approach restarting a USB device programatically in Windows XP/Vista/7 using the .NET framework?</strong></p>