Managing WMI Settings
Microsoft® Windows® 2000 Scripting Guide
WMI is an example of a self-instrumented service. This simply means that you can use WMI scripts to monitor, configure, and control the WMI service. In fact, WMI scripts can be used to enumerate and configure the following items:
Logging level, file size, and logging folder for the WMI service
Backup interval for the WMI repository
WMI time-out values
Default WMI namespace
The WMI service exposes many of its properties through the Win32_WMISetting class. You can write scripts to return information regarding the configuration of WMI on a computer, such as the error logging level, the location of the WMI repository, or a list of .mof files that will automatically be reinstalled if the repository becomes corrupted.
Table 8.12 includes some of the more commonly used properties found in the Win32_WMISetting class.
Table 8.12 Win32_WMISetting Properties
Property |
Description |
---|---|
ASPScriptDefaultNamespace |
Default script namespace. Contains the namespace used by calls from the WMI Scripting API if one is not specified by the caller. On most computers, the default namespace is root\cimV2. |
AutoRecoverMOFs |
List of fully qualified Managed Object Format (MOF) file names used to initialize or recover the WMI repository. The list determines the order in which MOF files are compiled. |
BackupInterval |
Length of time that will elapse between backups of the WMI database. |
BackupLastTime |
Time that the last backup of the WMI repository was performed. |
BuildVersion |
Version information for the currently installed WMI service. For Windows 2000, the build version is 1085.0005. |
DatabaseDirectory |
Directory path for the WMI repository. |
EnableEvents |
Indicates whether or not the WMI event subsystem is enabled. |
HighThresholdOnClientObjects |
Maximum rate at which provider-created objects can be delivered to clients. To accommodate speed differentials between providers and clients, WMI holds objects in queues before delivering them to consumers. WMI slows down the addition of new objects into the queue when the low threshold is reached. If this does not help, and high threshold (specified by this property) is reached, WMI accepts no more objects from providers and returns an out-of-memory error to the clients. |
HighThresholdOnEvents |
Maximum rate at which events are to be delivered to clients. To accommodate speed differentials between providers and clients, WMI queues events before delivering them to consumers. WMI slows down the addition of new events into the queue when the low threshold is reached. If this does not help, and high threshold (specified by this property) is reached, WMI accepts no more events from providers and returns an out-of-memory error to the clients. |
LoggingDirectory |
Directory path to the WMI system log files. |
LoggingLevel |
Indicates whether event logging is enabled and the level of logging used. Values include: 0 - No logging 1 - Error logging 2 - Verbose error logging |
LowThresholdOnClientObjects |
Rate at which WMI starts to slow the creation of new objects created for clients. To accommodate speed differentials between providers and clients, WMI holds objects in queues before delivering them to consumers. If the rate of requests for objects grows out of control, WMI gradually slows down the creation of new objects to match the rate used by the client. This slowdown starts when the rate at which objects are being created exceeds the value of this property. The slowdown continues until equilibrium is achieved or the high threshold is reached. |
LowThresholdOnEvents |
Rate at which WMI starts to slow the delivery of new events. To accommodate speed differentials between providers and clients, WMI queues events before delivering them to consumers. If the queue grows out of control, WMI slows down the delivery of events gradually to get them in line with the rate used by the client. This slowdown starts when the rate at which events are generated exceeds the value of this property. The slowdown continues until either the equilibrium is achieved or the high threshold is reached. |
MaxLogFileSize |
Maximum size of the log files produced by the WMI service. |
MaxWaitOnClientObjects |
Amount of time a newly created object waits to be used by the client before it is discarded and an error value is returned. |
MaxWaitOnEvents |
Amount of time for which an event sent to a client is queued before being discarded. |
MOFSelfInstallDirectory |
Directory path for applications that install MOF files to the WMI repository. WMI automatically compiles any MOF files placed in this directory and, depending on its success, moves the MOF to a subdirectory labeled good or bad. |