4

There are many entries in the "Devices and Printers" window showing devices which are no longer connected. How can I delete these entries all at once, ideally on the command line?

screenshot of "devices and printers"

This picture displays my issue. There are ninety seven devices on the list that were connected sometime in the past but only six of them are currently connected. I can remove them one by one by marking them and then clicking "Remove device" but it isn't possible to mark them all and remove them together.

6
  • More details are needed. Please tell us what you have researched and attempted to resolve this. Take a minute to read How to Ask to improve your question.
    – CharlieRB
    Jun 8, 2015 at 18:01
  • I have tried to search for something like "how to remove multiple devices windows", "bulk remove devices and printers" etc but most of results refer to how to remove multiple printers only. The question is simple - how to remove all devices except connected mouse and keyboard in Control Panel\Hardware and Sound\Devices and Printers - Devices. Which more details shall I provide? Thanks.
    – LukAss741
    Jun 8, 2015 at 18:13
  • 3
    Which more details shall I provide? How about the version of Windows you are using. We can assume Windows 7, but we shouldn't have to assume. How many devices are you referring to? 3? 10? 100? Obviously, if the number is below 5, you could have already done this manually by now. That is unless you are dealing with multiple computers. But we don't know that. Can you see how details are important?
    – CharlieRB
    Jun 8, 2015 at 18:34
  • windows 7 sorry for not noting that. It is like 10-100 devices on multiple computers. It would be ideal with a command since I would like to automate removing regularly. However any possibility to get rid of it is welcome.
    – LukAss741
    Jun 8, 2015 at 18:55
  • Which kind of devices are we talking about? Cell phones? Printers? Something else? A mix? Jun 8, 2015 at 22:05

3 Answers 3

3

To remove bluetooth devices I use btpair -u from http://bluetoothinstaller.com/bluetooth-command-line-tools/

To remove usb devices I use removedevices.js (which uses devcon) from https://github.com/kevinoid/remove-nonpresent-devices

thanks for advices

2

As the general tool for this job I would use Windows Device Console (devcon.exe) which is kind of a command line version of the Windows device manager.

Download it from Microsoft Support.

You have to play a bit with the command line, you can list devices and remove them from the system.

However there will not be a remove all the ones I don't use anymore switch. You most likely have to list all devices, filter them somehow and then remove them.

It's difficult to give exact instructions, not knowing all the devices you had attached to your system.

You want to be careful not too remove any active devices.

0

From another user and it works great!...

Open the run box, or search box in the start menu, and type in the following. Shell:PrintersFolder That will bring up what is basically the old printer view and you can highlight multiple devices and delete them. I have no idea why they removed that from the Printers and Devices view. This even works in the Windows 8 Metro interface. You just start typing and it will bring up the app search in Metro. It will then launch the Printers folder on the desktop. If you want a shortcut you can then drag the icon in the address bar at the top of the screen to your desktop or wherever you want it.

1
  • I have a similar problem with mouse device driver entries -- 104 of them. Is there an shell pointer that will bring those up?
    – overhear
    Mar 26, 2023 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .