Figure 1 WMI Management Information in Windows 2000

Core Win32 information
Process, service, computer system, operating system, logical disk, environment variables, network adapters, and more than 200 other objects
Microsoft Windows Installer
Installed software information
Windows NT Event Log
Receive Windows NT events, backup event logs
Performance Monitor
Access to Windows NT performance data
Registry
System registry information
Windows Driver Model (WDM)
Access for any WMI-enabled WDM device drivers (see http://www.microsoft.com/ddk)
Simple Network Management Protocol (SNMP)
Access to data and traps from any conformant SNMP device
Figure 4 SWbemServices
Methods
Description
AssociatorsOf
Returns an SWbemObjectSet collection of classes or instances that are associated with a specified object
ConnectServer
Connects to a WMI namespace, returning an SWbemServices object
Delete
Deletes an object
ExecMethod
Executes a method on a class or instance
ExecNotificationQuery
Executes a query to receive events
ExecQuery
Executes a query to retrieve an SWbemObjectSet collection
Get
Retrieves a single SWbemObject (class or instance)
InstancesOf
Returns an SWbemObjectSet containing the instances of a specified class
ReferencesTo
Returns an SWbemObjectSet collection of classes or instances that reference a specified object
SubclassesOf
Returns an SWbemObjectSet containing the subclasses of a specified class
Properties
Description
Security_
SWbemSecurity object that defines security attributes of this object
Figure 5 SWbemObject
Methods
Description
Associators_
Returns an SWbemObjectSet collection of classes or instances that are associated with this object
Clone_
Clones a copy of this object
CompareTo_
Compares this object to another object
Delete_
Deletes this object
ExecMethod_
Executes a method on this object
GetObjectText_
Returns a textual representation of this object
Instances_
Returns an SWbemObjectSet containing the instances of this object (which must be a CIM class)
Put_
Saves this object to CIMOM
References_
Returns an SWbemObjectSet collection of classes or instances that reference this object
SpawnDerivedClass_
Returns an SWbemObject representing an empty subclass of this object (which must be a CIM class)
SpawnInstance_
Returns an SWbemObject representing an empty instance of this object (which must be a CIM class)
Subclasses_
Returns an SWbemObjectSet containing the subclasses of this object (which must be a CIM class)
Properties
Description
Derivation_
An array of strings describing the derivation hierarchy for the class
Methods_
An SWbemMethodSet object that is the collection of CIM methods for this object
Path_
An SWbemObjectPath object that is the object path of this object
Properties_
An SWbemPropertySet object that is the collection of CIM properties for this object
Qualifiers_
An SWbemQualifierSet object that is the collection of CIM qualifiers for this object
Security_
SWbemSecurity object that defines security attributes of this object
Figure 6 SWbemSink
Methods
Description
Cancel
Cancels all currently outstanding asynchronous calls made using this Sink
Events
Description
OnCompleted
Called when an asynchronous operation is complete
OnObjectPut
Called after an SWbemObject.PutAsync_ operation
OnObjectReady
Called when an object provided by an asynchronous call is available
OnProgress
Called to provide the status of an asynchronous operation
Figure 7 Using WMI with Dynamic HTML

<HTML><HEAD>

<SCRIPT FOR="mysink" EVENT="OnCompleted(hResult, pErrorObject, pAsyncContext)" LANGUAGE="VBScript">
    alert("Completed")
</SCRIPT>

<SCRIPT FOR="mysink" EVENT="OnObjectReady(objObject, objAsyncContext)" LANGUAGE="VBScript">
    document.all.info.innerText = objObject.DisplayName
</SCRIPT>

<SCRIPT LANGUAGE="VBScript"> 
<!--
    
    Sub Document_OnClick 
        Set Service = Locator.ConnectServer()
        Service.GetAsync mysink,"Win32_Service.Name='Winmgmt'"
    end sub
-->
</SCRIPT>
</HEAD>
<BODY>
The name of the service is <SPAN ID="info"> unknown</SPAN>.
<OBJECT ID="Locator" 
    CLASSID="CLSID:76A64158-CB41-11D1-8B02-00600806D9B6"></OBJECT>
<OBJECT ID="mysink" 
    CLASSID="CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223"></OBJECT>
</BODY>
</HTML>