WMI Object Model

Management applications and scripts work with WMI through the WMI Object Model, as illustrated in Figure B.2. The object model defines the programming interface to WMI. The WMI Object Model illustrates how different elements within it relate to each other. It also shows the relationship between the elements, not the flow of data.

Figure B.2 Simplified WMI Object Model relationships between the WMI locator, service, properties, methods, qualifiers, and other objects

ops_ac_c2c

Figure B.2 is simplified in that it does not include all the elements of the WMI Object Model, such as object paths, named value sets, event sinks, and other less commonly used elements. Scripts commonly use the elements illustrated in Figure B.3. Other elements of the WMI Object Model can be used in scripts but they are all used in the context of the elements illustrated. For more information about the WMI Object Model, see the WMI SDK.

The elements of this simplified WMI Object Model are:

Locator Used to connect to the WMI service on a computer.

Service object Used to connect to the WMI service on a computer and is the main point of contact to WMI for programs.

Objects Fundamental representations of computer elements and are used by WMI and your scripts to identify to providers which specific elements that you want manipulated.

Events Changes to WMI objects. Events can be captured as objects and then manipulated in the same ways that any other objects, except that they cannot be changed or saved in WMI.

Properties Supplies descriptive or operational information about an object. For example, a Win32_DiskDrive object includes a property called InterfaceType, which might have the value of IDE for your C: drive. Properties can also be set to particular values, if the property is changeable. Setting InterfaceType to SCSI is not appropriate, because the only way to change the actual interface type is to replace the controller card. However, you can set a share name to a different value.

Methods Actions that you can execute on objects. For example, a Win32_Directory object includes a method called Compress() that allows the contents of a folder to be compressed in the same way as can be done by using the Windows graphical user interface.

Qualifiers Characteristics of objects, properties, and methods. For example, a qualifier for a property might indicate that it is read-only, or it might list the allowable values for the property. A qualifier for an object might be that it is read-only.

For examples of scripts that use the WMI Object Model to access SMS data, see Appendix C, "Scripting SMS Operations."

For More Information

Did you find this information useful? Please send your suggestions and comments about the documentation to smsdocs@microsoft.com.