WMI Control

  • WMI overview
  • WMI Control overview
  • Turn WMI error logging on or off
  • Specify the interval between repository backups
  • Change the WMI scripting settings
  • Security


WMI overview

Microsoft Windows graphic

Windows Management Instrumentation overview

Windows Management Instrumentation (WMI) is the Microsoft implementation of WBEM, an industry initiative to establish standards for accessing and sharing management information over an enterprise network. WMI is WBEM-compliant and provides integrated support for the Common Information Model (CIM) - the data model that describes the objects that exist in a management environment.

WMI includes a CIM-compliant object repository, which is the database of object definitions, and the CIM Object Manager, which handles the collection and manipulation of objects in the repository and gathers information from WMI providers. WMI providers act as intermediaries between WMI and components of the operating system, applications, and other systems. For example, the registry provider draws information from the registry, while the SNMP provider provides data and events from SNMP devices. Providers provide information about their components, and might provide methods to manipulate the components, properties that can be set, or events that can alert you to changes in the components.

WMI can be used by computer management tools, such as Microsoft Systems Management Server, to help you manage your computers. WMI is also used by other Microsoft technologies and tools, such as Microsoft Health Monitor and Microsoft Operations Manager, and by other vendors of computer management systems. You can use WMI with programming or scripting systems (such as Windows Script Host) to retrieve configuration details about most aspects of your computer systems, including server applications, or to affect changes to your systems - see the WMI SDK for more details.

Several management tools are WMI-enabled, including System Properties, System Information, and the Dependencies component of Services. These components are briefly described below:

  • System Properties lets you view and change system properties on a local or remote computer. You can restart a remote computer to apply settings changes or to detect new hardware, view the computer name and domain information for other computers on your network, or change the settings for the virtual memory paging file on a computer that might run programs requiring a lot of memory. For more information about System Properties, see Using System Properties.
  • System Information collects and displays configuration information about your system. This is is especially useful when troubleshooting your system with a support technician. For more information, see Using System Information.
  • Services helps you manage the services on your computer. Services dependencies identify the services upon which the current service is dependent and the services that are dependent upon it. For more information about Services, see Using Services.
For technical information about developing for the WMI system, see the WMI Software Development Kit (SDK). The WMI SDK is released by Microsoft Developer Network (MSDN) as part of the Microsoft Platform SDK.


WMI Control overview

The WMI (Windows Management Instrumentation) Control is a tool that enables you to configure WMI settings on a remote computer or local computer. Using the WMI Control, you can:

Authorize users or groups and set permission levels

You can authorize a user or a group to access and perform WMI tasks and services. For each user or group you authorize, you set their permission level for specific namespaces. For example, you can enable a group to manage WMI's Common Information Model (CIM) objects on their local computers.

Configure error logging

You can turn error logging on or off and, if turned on, set it to report errors only (the default) or all actions (verbose). Error logging can help you troubleshoot WMI problems. You can also define a maximum size for log files and their folder location.

Back up the repository

You can configure the WMI control to back up your repository on a regularly-scheduled basis, or you can do it manually at any time. The repository is the database of objects that can be accessed through WMI. You can also restore a previous version of the repository.

Change the default namespace for scripting

You can change the default namespace that is targeted in WMI scripts.

Connect as a different user

You can log on under a different user name to change WMI Control settings. For example, if you have defined an administrative user account on several workstations, you can connect to those workstations under that user name.

Related Topics


Turn WMI error logging on or off

To turn WMI error logging on or off

  1. Open WMI Control.
  2. In the console tree, right-click WMI Control, and then click Properties.
  3. Click the Logging tab.
  4. Under Logging level, click Disabled to turn logging off. Click either Errors only or Verbose to turn logging on.

Notes

  • You must be an administrator or a member of the Administrators group on the computer you are managing, or have been given appropriate permissions, to perform this task.
  • To open the WMI Control console, click Start, click Run, type wmimgmt.msc, and then click OK.
  • Errors only reports errors that occur within WMI. Verbose reports all actions and errors.
  • Verbose logging can negatively impact system performance, so select Verbose only when you need more extensive information about the events leading to errors.
  • Log files are maintained for the WMI core and framework, as well as for each WMI-enabled provider.
  • You can set the maximum size for log files under Maximum size. When a log file has reached the maximum size, it is renamed with the .lo_ extension, and a new log file is created with the .log extension. When that file reaches the defined maximum size, the first file is deleted and the process is repeated.
  • You can set logging levels on a remote computer or a local computer. To access a remote computer, right-click WMI Control, click Connect to another computer, click Another computer, and then type the name of the computer to which you want to connect. If you are using WMI Control from the Computer Management console, right-click the Computer Management node to connect to the other computer.
  • You can connect to the computer as a different user if you have multiple logon names. To connect as another user, click the General tab, click Change, clear the Log on as current user check box, and then type a user name and password.
  • It is recommended that you include log files when reporting issues associated with WMI services.


Specify the interval between repository backups

To backup or restore the WMI repository

  1. Open WMI Control.
  2. In the console tree, right-click WMI Control, and then click Properties.
  3. Click the Backup/Restore tab.
  4. Click the Back Up Now button or Restore Now button.

Notes

  • You must be an administrator or a member of the Administrators group on the computer you are managing, or have been given appropriate permissions, to perform this task.
  • To open the WMI Control console, click Start, click Run, type wmimgmt.msc, and then click OK.
  • When you click the Back Up Now button to back up the repository manually, you can back up to a specified file name, and later restore from that saved file. This can be useful if you want to save a specific configuration of classes.
  • You can backup or restore a remote computer or a local computer. To access a remote computer, right-click WMI Control, click Connect to another computer, click Another computer, and then type the name of the computer to which you want to connect. If you are using WMI Control from the Computer Management console, right-click the Computer Management node to connect to the other computer.
  • You can connect to the computer as a different user if you have multiple logon names. To connect as another user, click the General tab, click Change, clear the Log on as current user check box, and then type a user name and password.


Change the WMI scripting settings

To change the WMI scripting settings

  1. Open WMI Control.
  2. In the console tree, right-click WMI Control, and then click Properties.
  3. Click the Advanced tab.
  4. Under Default namespace for scripting, click Change.
  5. In the Browser for Namespace dialog box, select a different default namespace as a target for your scripts.

Notes

  • You must be an administrator or a member of the Administrators group on the computer you are managing, or have been given appropriate permissions, to perform this task.
  • To open the WMI Control console, click Start, click Run, type wmimgmt.msc, and then click OK.
  • Set the default targeted namespace to one you use most often in your WMI scripts. If no namespace is identified within a script, the default will be used.
  • If the computer you are managing is running Windows NT 4.0, you can define whether WMI scripts can be run from within Active Server Pages (ASP). If you enable the option, your ASP will always connect to Windows Management services using the process level identity of Internet Information Services, which may compromise security.
  • You can change the scripting namespace on a remote computer or a local computer. To access a remote computer, right-click WMI Control, click Connect to another computer, click Another computer, and then type the name of the computer to which you want to connect. If you are using WMI Control from the Computer Management console, right-click the Computer Management node to connect to the other computer.
  • You can connect to the computer as a different user if you have multiple logon names. To connect as another user, click the General tab, click Change, clear the Log on as current user check box, and then type a user name and password.


Security

  • Managing WMI security
  • Authorize WMI users and set permissions
  • Modify permissions or delete authorized users


Managing WMI security

Windows Management Instrumentation (WMI) supports a limited form of security that validates each user before the user is allowed to connect to WMI, on either the local computer or a remote computer. This security is layered on top of the operating system security. WMI does not override or circumvent security provided by the operating system.

By default, all members of the Administrators group have full control of the WMI services on the computer that is being managed. All others have read/write/execute permissions on their local computer only.

Permissions can be changed, either by adding a user to the Administrators group on the managed computer, or by authorizing users or groups in WMI and setting their permission level. Access is based on WMI namespaces.

On computers running Windows 95, Windows 98, or Windows Millennium Edition, all users have full control locally. However, permissions can be set for users managing a Windows 95, Windows 98, or Windows Millennium Edition computer remotely.

Security is checked only when a user connects to the Windows Management service. Thus, any changes made to a user's permissions while the user is connected will not take effect until the next time the user starts a WMI service. For example, if a user's access is revoked, the changes will not take effect until the user exits from WMI and attempts to connect to the service again.


Authorized WMI users and set permissions

To authorize WMI users and set permissions

  1. Open WMI Control.
  2. In the console tree, right-click WMI Control, and then click Properties.
  3. Click the Security tab.
  4. Select the namespace for which you want to give a user or group access, and then click Security.
  5. In the Security dialog box, click Add.
  6. In the Select Users, Computers, or Groups dialog box, enter the name of the object (user or group) that you want to add. Click the Check Names button to verify your entry and then click OK. You might have to change the location or use the Advanced button to query for objects. See the dialog box help for more details.
  7. In the Security dialog box, under Permissions, select the permissions to allow or deny the new user or group.
    8. Level | Description
Execute Methods | Allows methods exported from the WMI classes or instances to be run.
Full Write | Allows full read, write, and delete access to all WMI objects, classes, and instances.
Partial Write | Allows write access to static WMI objects.
Provider Write | Allows write access to objects that are provided by providers.
Enable Account | Allows read access to WMI objects.
Remote Enable | Allows remote access to the namespace.
Read Security | Allows read-only access to WMI security information.
Edit Security | Allows read and write access to WMI security information.

Notes

  • To open the WMI Control console, click Start, click Run, type wmimgmt.msc, and then click OK.
  • You must be an administrator or a member of the Administrators group on the computer you are managing, or have been given appropriate permissions, to perform this task.
  • You can set permissions on a remote computer or a local computer. To access a remote computer, right-click WMI Control, click Connect to another computer, click Another computer, and then type the name of the computer to which you want to connect. If you are using WMI Control from the Computer Management console, right-click the Computer Management node to connect to the other computer.
  • You can connect to the computer as a different user if you have multiple logon names. To connect as another user, click the General tab, click Change, clear the Log on as current user check box, and then type a user name and password.
  • On computers running Windows 95, Windows 98, or Windows Millennium Edition, all users have full control locally. Security settings are only relevant for remote connection to a computer running Windows 95, Windows 98, or Windows Millennium Edition.
  • You can delete a user's or group's authorization to access WMI services by selecting that user or group and clicking Remove.


Modify permissions or delete authorized users

To modify permissions or delete authorized users

  1. Open WMI Control.
  2. In the console tree, right-click WMI Control, and then click Properties.
  3. Click the Security tab.
  4. Select the namespace for which you want to change a user's or group's permissions or delete a user or group, and then click Security.
  5. In the Security dialog box, under Name, select the user or group you want to remove or whose permissions you want to modify.
  6. Perform one of the following steps:
    • To remove the user or group, click Remove.
    • To change security settings, under Permissions, modify the permissions which are allowed or denied to the user or group by clearing or selecting the appropriate check boxes.

Notes

  • You must be an administrator or a member of the Administrators group on the computer you are managing, or have been given appropriate permissions, to perform this task.
  • To open the WMI Control console, click Start, click Run, type wmimgmt.msc, and then click OK.
  • WMI security is verified only when a user logs on to Windows Management services. Thus, any changes made to a user's permissions while the user is connected will not take effect until the next time the user logs on to WMI. For example, if a user's access is revoked, the changes will not take effect until the user logs off Windows Management services and attempts to log on again.
  • You can modify user or group permissions on a remote computer or a local computer. To access a remote computer, right-click WMI Control, click Connect to another computer, click Another computer, and then type the name of the computer to which you want to connect. If you are using WMI Control from the Computer Management console, right-click the Computer Management node to connect to the other computer.
  • You can connect to the computer as a different user if you have multiple logon names. To connect as another user, click the General tab, click Change, clear the Log on as current user check box, and then type a user name and password.