3

I'm (unfortunately) venturing into Windows (XP) scripting and WMI (Windows Management Instrumentation) as I am attempting to write scripts that will configure such things as network adapters, users etc.

Key to this seems to be the so-called WMI 'Namespaces'; once one has the name spaces apparently it's possible to discover classes within the namespace and read/alter data as necessary. (Apologies if I have misunderstood anything about WMI & namespaces).

So the obvious question is, just what WMI namespaces are available? It's fine being able to write a script that lists them but where is the official Microsoft list of namespaces? How on earth are you supposed to know what:

  1. Namespaces official exist?
  2. What classes are under each namespace?
  3. Where do I look for a specific class say for network settings?
D-Dᴙum
  • 7,689
  • 8
  • 58
  • 97

2 Answers2

4

I created the list, you can see it at http://wutils.com/wmi/namespaces.html. It is not official list, of course. It contains list of namespaces in plain installation of Windows server with some extensions (sql server, exchange) and list of classes/properties/methods in each of the namespace.

2

1.Namespaces official exist?

AFAIK there is not a official list of WMI namespaces, but you can get the list of installed namespaces programmatically.

2.What classes are under each namespace?

Again there isn't a official list, but you can get this list connecting to each namespace and then executing this WQL sentence

select * from meta_class

3.Where do I look for a specific class say for network settings?

Take a look to the MSDN documentation Windows Management Infrastructure Classes

If you need more information about the WMI classes and namespaces I will recommend you use a tool like the WMI Delphi Code Creator, this tool allows you to generate code to access the WMI classes, events and methods. Also includes a set of options to search classes related to a specific keyword, execute WQL sentences, get metadata info about any WMI class and so on.

Community
  • 1
  • 1
RRUZ
  • 134,889
  • 20
  • 356
  • 483
  • Hi RRUZ, thanks for your answer. I must have a misunderstanding about namespaces? I assumed they were a list of Microsoft defined 'packages' if you will, therefore could be referred to by means of documentation? – D-Dᴙum Aug 21 '12 at 16:54