19

I would like to obtain by a command prompt a list of all USB devices connected to my computer (O.S. Windows 10). I've googled to find such a command, but all results seems useless to me or worse workless. Does anybody know how can I do that?

Thank you

evanhutomo
  • 531
  • 1
  • 8
  • 22
Luca
  • 193
  • 1
  • 1
  • 5

4 Answers4

28

You can use the wmic command:

wmic path CIM_LogicalDevice where "Description like 'USB%'" get /value
Cristian Ciupitu
  • 19,240
  • 7
  • 48
  • 73
Ronny D'Hoore
  • 682
  • 7
  • 9
5

With powershell, you can use the command :

Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
Mimouni
  • 3,236
  • 3
  • 26
  • 33
2

You could use wmic command:

wmic logicaldisk where drivetype=2 get <DeviceID, VolumeName, Description, ...>

Drivetype 2 indicates that its a removable disk.

WesternGun
  • 9,320
  • 72
  • 124
  • 1
    you have to remove spaces around '=' to get result -> wmic logicaldisk where drivetype=2 get * – N.S Feb 20 '19 at 08:21
  • You should have in mind, that external Hard Drives have drivetype=3 (local disk) like internal hard drives. Only USB sticks have drivetype=2. – Ruik Mar 10 '21 at 13:22
-6

you can download USBview and get all the information you need. Along with the list of devices it will also show you the configuration of each device.

Ankit Gupta
  • 490
  • 6
  • 10
  • 1
    USBview is part of the debug tools for windows. You can see how to get this program here. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/usbview – styks Feb 11 '18 at 22:51
  • 4
    Why is this accepted and -6 without any good comments? – Barnaba Aug 28 '20 at 14:21
  • 1
    The accepted answer is not a command. Thats why I down voted. – NDEthos Apr 14 '21 at 16:49
  • 1
    if the accepted answer is not something that was wanted in the first place, then it means that the question was somewhat asked incorrectly. So i think it's better to down vote the question either. because it wanted a command but accepted a software recommendation as the answer! so the question was not asked correctly at the first place, right? – Mahmood Kiaheyrati Oct 16 '21 at 21:58