Get Information from Windows device manager

I would like to get some data from a System Device in Windows Device Manager, either via the windows sdk(preferable) or powershell.I attach some pictures for reference.

enter image description here


Solution 1:

As mentioned in this answer you can use Get-CimInstance win32_PnPSignedDriver to get most information. For your example you would then need to select a description containing the text you are interested in.

For example (with different chipset)

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          :

If you only wanted the one "Location" property you can put that in a select clause.

PS C:\> Get-CimInstance win32_PnPSignedDriver | where description -like '*3b34*' | select Location

location
--------
PCI bus 0, device 29, function 0

Details on the resources tab can be found via Win32_PNPAllocatedResource by looking for first 40 characters of DeviceID in Dependent. For example taking the same example :

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...)

The IRQ and start of Memory Range are shown (in decimal). If you want you can drill down into Win32_DeviceMemoryAddress to get the range (in hex) by using the StartingAddress.

PS C:\> get-ciminstance Win32_DeviceMemoryAddress | where StartingAddress -eq '4067591168' | Select Name

Name
----
0xF2728400-0xF27287FF

Device Manager - Resources