How do you query for WMI namespaces?

Matt picture Matt · Mar 16, 2011 · Viewed 20.7k times · Source

How do you query for WMI namespaces?

So I know about WMI namespaces because I read that they exits and I know I can connect to say:

root\cimv2

My question is what if I didn't know what namespaces were there, how would I go about querying for the available namespaces?

I just sort of want to go exploring the WMI and not have to look up each namespace.

I'm using WBEMtest, but I'll take anything, .NET, winapi.h, what have you.

Answer

ravikanth picture ravikanth · Mar 19, 2011

I understand that you got your answer but wanted to show how easy it is in PowerShell to get a list of namespaces:

Get-WMIObject -namespace "root" -class "__Namespace" | Select Name