Use WMI to Create Hardware Inventory

by May 31, 2011

You can use Get-WMIObject to create a high-level hardware report. Instead of submitting a specific device class name, you should use a generic device class that applies to all hardware devices:

PS> Get-WmiObject -Class CIM_LogicalDevice |
Select-Object -Property Caption, Description, __Class

The __Class column lists the specific device class. If you'd like to find out more details about  a specific device class, you can then pick the name and query again:

PS > Get-WmiObject -Class Win32_PnPEntity |
Select-Object Name, Service, ClassGUID |
Sort-Object ClassGUID


Twitter This Tip!
ReTweet this Tip!