Command-line tool for rescanning for devices.


Command-line tool for rescanning for devices.

by Charlie Welch

Have you ever had a Plug N Play or USB device that never worked right after removing it from the computer and plugging it back in, or a suspend/resume?

One of our clients does external USB drives for an offsite backup once per week. This drive wasn’t being automaticly recognized when it was plugged back in, like you’d expect. This meant that someone (Darien in this example) would have to RDP to their server and manually Device Manager rescan for new items. The problem is that if you forget to do this, the target media is unavailable. What to do??

After a quick bit of research, I found a utility to help out Darien in his quest to get rid of this problem. The utility is devcon.exe and is available for free from Microsoft here.The download package contains both 32-bit and 64-bit versions, so be sure you use the propper file. The program is a stand alone .exe and does not require any installation. The KnowledgeBase article says it works with Windows 200, XP, and 2003. No mention is made of Windows Vista, 7, or 2008, so if anyone tries it, please update.

The utility offers the ability to enable, disable, list, and remove devices as well as deleting, listing, and updating their drivers, and other useful information. For this particular problem, I copied the 32-bit version to C: and used:

c:devcon.exe rescan

Notice the lack of / or – before the command argument. I didn’t try it with either as the Help for the utility didn’t show it being used either. It might or might not work with a switch prefix.

This coupled with learning how the pre and post commands work in Backup Exec (thanks Jay V!) may just have squashed this issue. As the client is closed this week for vacation, we won’t know for certain until they resume normal business, but everything looks good!


[Source: Microsoft KB Article 311272]

More About the Author

Charlie Welch

Systems Technician
Command-line tool for rescanning for devices. Have you ever had a Plug N Play or USB device that never worked right after removing it from the computer and plugging it back in, or a ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK


Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Geschäftsführer: Mel Stephenson

Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072