Obtaining the name and details of the USB port

How can I get all the USB ports and related data, such as the port name, using the Power Script shell?

I tried the Win32_USBControllerDevice class . But the port name did not work.

+4
source share
1 answer
 gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)} |select name,description, deviceID, manufacturer | format-table -group by manufacturer 

Some explanation

The WMI class WIN32_USBControllerDevice describes the connection between USB controllers ( Antecedent ) and their logical devices [CIM_LOGICALDEVICE] ( Dependent )

  PS> gwmi Win32_USBControllerDevice | fl Antecedent, Dependent Antecedent: \\. \ Root \ cimv2: Win32_USBController.DeviceID = "PCI \\ VEN_8086 & DEV_3A35 & SUBSYS_02931028 & REV_00 \\ 3 & 172E68Dnd & 2 USB \ Dep USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB USB \ ROOT_HUB \\ 4 & 10B856B0 & 0 "

now you can check win32_PnPEntity to get more information about ex device:

  gwmi Win32_PnPEntity -Filter "DeviceID = 'USBSTOR \\ DISK & ..'"
+3
source

Source: https://habr.com/ru/post/1447696/


All Articles