Leveraging WMI Scripting: Using Windows Management Instrumentation to Solve Windows Management Problems

The Win32 Clock provider is an instance and an event provider. The provider capabilities are summarized in Table 3.34.
| Provider Name | Provider Namespace | Class Provider | Instance Provider | Method Provider | Property Provider | Event Provider | Event Consumer Provider | Support Get | Support Put | Support Enumeration | Support Delete | Windows XP | Windows Server 2003 | Windows 2000 Professional | Windows 2000 Server |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Clock Provider | |||||||||||||||
| Win32ClockProvider | Root/CIMV2 | X | X | X | X | X | X |
As shown in Table 3.35, this provider supports two classes: the Win32_LocalTime and Win32_UTCTime classes.
| Name | Type | Comments |
|---|---|---|
| Win32_LocalTime | Dynamic (Singleton) | Represents an instance of the local time |
| Win32_UTCTime | Dynamic (Singleton) | Represents an instance of the UTC time |
These two classes are created from the Win32_CurrentTime superclass (see Figure 3.18). All classes are singleton classes. There is no particular event class, since the Clock provider works with the __ InstanceModificationEvent intrinsic event class.
Because this provider is implemented as an event provider, it is possible to formulate a WQL query without the WITHIN statement. For example, the following query:
Select * From __InstanceModificationEvent Where TargetInstance ISA 'Win32_LocalTime'
will trigger a notification every time the local time changes. We can obtain the same result by performing...