PowerShell with a Purpose Blog

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!

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.