WMI classes are typcially collections. Of the members of these collections, you typcially only want to work with one.
Calling Get-WMIObject $className will give you every bit of information about every one of them.
To explore in a cleaner manner, add the following two functions to your PowerShell profile. This function will get just the names of the collection members. Use it to decide which collection member you would like to work with.
function List-WMI( [string] $class )
{
$strComputer = "."
$items = get-wmiobject -class $class -namespace "root\cimv2" -computername $strComputer
foreach ($objItem in $items) {
write-host $objItem.Name
}
}
Usage example:
List-WMI('Win32_Desktop')
or
List-WMI 'Win32_NetworkAdapter'
Next, you can use this function to grab just the item from the collection that you want.
function Get-WMI-Named( [string] $class, [string] $name )
{
return get-wmiobject -class $class -filter "Name='$name'"
}
Usage example:
Get-WMI-Named('Win32_Desktop', 'Edward')
Now use the Get-Member function to learn what methods and properties the object you’re examining has.
Get-WMI-Named('Win32_Desktop', 'Edward') | Get-Member