Programmatically list WMI classes and their properties

Is there any known way to list the WMI classes and their properties available for a particular system? I'm interested in the vbscript approach, but please suggest something really :)

PS Great site.

+7
vbscript wmi
source share
2 answers

I believe that this is what you want.

WMI Code Creator

Part of this nifty utility allows you to view namespaces / classes / properties on a local and remote PC, not to mention generating WMI code in VBScript / C # / VB on the fly. Very useful.

In addition, the source code used to create the utility is included in the download, which can provide a link if you want to create your own browser, for example, an interface.

+5
source share

This MSDN page looks over the list of available classes: How-to. List of classes in the WMI namespace

to get properties from a class:

ManagementPath l_Path = new ManagementPath(l_className); ManagementClass l_Class = new ManagementClass(myScope, l_ManagementPath, null); foreach (PropertyData l_PropertyData in l_Class.Properties) { string l_type = l_PropertyData.Type.ToString()); int l_length = Convert.ToInt32(l_PropertyData.Qualifiers["maxlen"].Value); } 
+2
source share

All Articles