Find WMI Classes

by Jul 30, 2012

Get-WmiObject is a great cmdlet that returns all instances of a WMI class:

PS> Get-WmiObject -Class Win32_LogicalDisk

All you need to know is the name of the appropriate WMI class that represents what you are looking for. Fortunately, Get-WmiObject has a built-in class browser. Simply add the switch parameter -List, and now you can use wildcards:

PS> Get-WmiObject -Class Win32_*Disk* -List

Next, use the first call again and replace the class name with the class you want to try. Note that not all of the class names provide useful information. If the command does not return anything, then that's OK: it tells you that there is no instance for the class you specified.

Twitter This Tip! ReTweet this Tip!