如何使用Power Shell Script获取所有USB端口和端口名称等相关详细信息?
我试过了Win32_USBControllerDevice class
.但没有获得端口名称.
gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)} |select name,description, deviceID, manufacturer | format-table -group by manufacturer
Run Code Online (Sandbox Code Playgroud)
WMI 类描述 USB 控制器 ( ) 与其逻辑设备( )WIN32_USBControllerDevice
之间的连接Antecedent
[CIM_LOGICALDEVICE]
Dependent
PS>gwmi Win32_USBControllerDevice |fl 先行词,从属先行词:\\.\root\cimv2:Win32_USBController.DeviceID="PCI\\VEN_8086 &DEV_3A35&SUBSYS_02931028&REV_00\\3&172E68DD&0&E9" 从属:\\.\root\cimv2:Win32_PnPEntity。设备ID=“USB\” \ROOT_HUB\\4&10B856B0&0"
现在您可以检查win32_PnPEntity
以获取有关设备 ex 的更多信息:
gwmi Win32_PnPEntity -Filter "DeviceID='USBSTOR\\DISK&..'"
归档时间: |
|
查看次数: |
11136 次 |
最近记录: |