Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMD command to check connected USB devices

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

like image 524
Luca Avatar asked Jun 08 '17 10:06

Luca


People also ask

How can I see connected devices using CMD?

For Windows Users: Type CMD in the search box and click Run as Administrator from the menu. Enter the net view command to view devices connected to your network You will then see a list of devices connected to your network in the output.

How do I identify a device on a USB port?

In Device Manager, click View, and click Devices by connection. In Devices by connection view, you can easily see the USB Mass Storage device under the Intel® USB 3.0 eXtensible Host Controller category.


3 Answers

You can use the wmic command:

wmic path CIM_LogicalDevice where "Description like 'USB%'" get /value
like image 98
Ronny D'Hoore Avatar answered Sep 21 '22 00:09

Ronny D'Hoore


With powershell, you can use the command :

Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
like image 27
Mimouni Avatar answered Sep 17 '22 00:09

Mimouni


You could use wmic command:

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

Drivetype 2 indicates that its a removable disk.

like image 45
Sooraj Kumar Avatar answered Sep 21 '22 00:09

Sooraj Kumar