by lunarg on September 14th 2010, at 11:56

Ever so often, when a hardware device fails or gets replaced by another, the old one still slumbers in the deep abyss that is Windows. Usually, this is not really a problem as the unused device only takes up disk space in the form of drivers and/or support software.
In case of network equipment, that's another story. Setting a static IP on a network adapter, replacing it with another, then setting the same static address on the replacement invokes a confusing warning message. In case of 2008 SBS, it gets even worse as running certain wizards will barf out errors about not being the primary adapter, not having a static address, and so on.

Getting rid of those pesky ghost devices is not easy: they are simply not visible in Device Manager, even if you enable the Show hidden devices option. To accomodate, one can either search the internet for one of many third party device managers (there are plenty and some are quite good), or you can use the undocumented feature of Windows's device manager, enabling the display of devices (hardware or otherwise) not present in the system. Here's how:

  1. Open an elevated Command prompt.
  2. Set the following environment variable by typing in:
  3. set devmgr_show_nonpresent_devices=1
  4. You won't get much output. Start Device manager (best from the command line as well).
  5. devmgmt.msc
  6. You get a device manager, exactly the same as the one you're used to. By default, the new devices are still not present because they are marked as hidden. Go to View and enable Show hidden devices. The hidden devices should be visible again, but now, you will also notice other devices that are grayed out. These are the devices that are currently not present in your system.

To kick out a device, navigate to the device, right-click and choose Uninstall.

It's very important not to kick out just about anything. There will be quite a few devices that appear to be unused but are in fact important system components. Don't remove anything unless you're absolutely certain it can be removed. Otherwise, you could very well hose your system with ease.

Avoid kicking out a device you will be using again in the future (like an USB printer). While in theory, Windows would install the device again when connected, it is totally unnecessary and could cause trouble during reinstallation - after all, it's only theoretical...