header image

W2KSG: WMI classes

Posted by: | September 21, 2008 | No Comment |

WMI is arranged in a hierarchy of namespaces and classes.  To see the namespaces on a machine use

## Listing 6.10
Get-WmiObject -Class __NAMESPACE -Namespace root | Select Name

If you want to see if there are any namespaces within name spaces you will need to check each namespace in a similar manner.  I’ll leave this as an exercise – think of recursion.

To see the WMI classes in a namespace use

## Listing 6.13
Get-WmiObject -List

This will list the classes of the default namespace – root\cimv2.  If you want to see anyother namespace use the namespace parameter.


Share this post :


Technorati Tags: ,

under: PowerShell and WMI