Listing WMI Namespaces

As you know, every computer in your environment can have slightly different WMI capabilities, depending upon what roles, software, and technologies are installed. Being able to quickly list the available namespaces is pretty useful - especially if you can do it remotely. In PowerShell, it's not too hard:

gwmi -namespace "root" -class "__Namespace" | Select Name

Be careful: There are TWO underscores in front of Namespace!

Once you have a namespace's name, listing its classes is even easier:

gwmi -namespace root\cimv2 -list

Just replace the appropriate namespace name and you're done. Best of all, these work with the -computeName parameter of Get-WmiObject for remote computer support!

Please or Register to post comments.

What's PowerShell with a Purpose Blog?

Don Jones demystifies Windows PowerShell.

Blog Archive

Sponsored Introduction Continue on to (or wait seconds) ×