答案1
正如所提到的这个答案您可以使用它Get-CimInstance win32_PnPSignedDriver
来获取大多数信息。对于您的示例,您需要选择包含您感兴趣的文本的描述。
例如(使用不同的芯片组)
PS C:\> Get-CimInstance win32_PnPSignedDriver | where description -like '*3b34*'
Caption :
Description : Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B34
InstallDate :
Name :
Status :
CreationClassName :
Started :
StartMode :
SystemCreationClassName :
SystemName :
ClassGuid : {36fc9e60-c465-11cf-8056-444553540000}
CompatID : PCI\VEN_8086&DEV_3B34&REV_06
DeviceClass : USB
DeviceID : PCI\VEN_8086&DEV_3B34&SUBSYS_216317AA&REV_06\3&B1BFB68&0&E8
DeviceName : Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B34
DevLoader :
DriverDate : 21/06/2006 02:00:00
DriverName :
DriverProviderName : Microsoft
DriverVersion : 10.0.17763.1
FriendlyName :
HardWareID : PCI\VEN_8086&DEV_3B34&SUBSYS_216317AA&REV_06
InfName : usbport.inf
IsSigned : True
Location : PCI bus 0, device 29, function 0
Manufacturer : Intel
PDO : \Device\NTPNP_PCI0015
Signer : Microsoft Windows
PSComputerName :
如果您只想要一个“位置”属性,您可以将其放在选择子句中。
PS C:\> Get-CimInstance win32_PnPSignedDriver | where description -like '*3b34*' | select Location
location
--------
PCI bus 0, device 29, function 0
可以通过Win32_PNPAllocatedResource
查找DeviceID
中的前 40 个字符来找到资源选项卡上的详细信息Dependent
。例如,以同样的例子为例:
PS C:\> $Text='3b34'
PS C:\> $DeviceID=[string[]](Get-CimInstance Win32_PnPEntity | where Description -like "*$Text*" | select DeviceID)
PS C:\> $Partial=$DeviceID.substring(11,39)
PS C:\> Get-CimInstance Win32_PNPAllocatedResource | where Dependent -like "*$Partial*"
Antecedent Dependent PSComputerN
ame
---------- --------- -----------
Win32_DeviceMemoryAddress (StartingAddress = 4067591168) Win32_PnPEntity (DeviceID = "PCI\VEN_8086&DEV_3B34&SUBSYS_216317AA&R...)
Win32_IRQResource (IRQNumber = 19) Win32_PnPEntity (DeviceID = "PCI\VEN_8086&DEV_3B34&SUBSYS_216317AA&R...)
显示 IRQ 和内存范围的起始位置(十进制)。如果您愿意,可以使用 深入了解Win32_DeviceMemoryAddress
以获取范围(十六进制)StartingAddress
。
PS C:\> get-ciminstance Win32_DeviceMemoryAddress | where StartingAddress -eq '4067591168' | Select Name
Name
----
0xF2728400-0xF27287FF