0

I need a command to list the connected devices via USB in Windows 8 (no PowerShell, only CMD)

I can't use aditional software. I can't use a batch file. I can't use another tool. I only can use CMD to detect the connected devices. It's not important the type of devices, only need to know the port of the devices.

Christian Elías
  • 41
  • 1
  • 2
  • 7
  • A WMI query via WMIC, e.g. https://stackoverflow.com/questions/44433346/cmd-command-to-check-connected-usb-devices – Alex K. Sep 16 '20 at 14:46
  • Just note, if you take the [[tag:wmic]] route, that a with `Win32_LogicalDisk`, a `drivetype` of `2`, does not mean it's USB device, just a drive which identifies as removable. Also all USB drives do not identify themselves as such, so they may not be listed either. – Compo Sep 16 '20 at 19:20

1 Answers1

2

You can use devcon to list the USBs: %WindowsSdkDir%\tools\x64\devcon.exe /find *USB* - but you need Windows SDK installed for it to be available.

On Windows 10 you don't need the SDK and can use the pnputil /enum-devices | findstr USB to list the devices but this functionality isn't available on Win8.

You can also try wmic per @AlexK comment

SomeWittyUsername
  • 18,025
  • 3
  • 42
  • 85