WMI - Windows Management Instrumentation
Windows Management Instrumentation (WMI) is a scalable, extensible management infrastructure, included as part of Windows 2000 and later. An implementation of the Web-based Enterprise Management (WBEM), and based on the Common Information Model (CIM) adopted by the Distributed Management Task Force (DMTF), it includes a rich set of management data about computer systems, the operating system, and applications on a given managed system.
WMI includes a comprehensive set of powerfull classes, to enable (remote) administration, including:
- WMI Application Classes samples
- WMI Exchange Classes samples
- WMI Computer Hardware Classes samples
- WMI Operating System Classes samples
- WMI Performance Counter Classes samples
- WMI .NET Framework Performance Counter Classes samples
- WMI Asynchronous WMI calls Classes samples
- WMI Connect to remote WMI computers Classes samples
- WMI Microsoft SQL Server Classes samples
- WMI Miscellaneous WMI calls Classes samples
Through a set of object classes derived from the CIM model, applications and scripts can view and change properties, execute methods, and receive events about modeled objects. For example, WMI exposes a wealth of information about the operating system (how many processes are running, the operational state of a particular service, current processor usage, etc.) and publishes it in a common schema that is accessible locally and remotely through standard script languages. Other benefits of WMI include:
- Uniform Scripting API - All managed objects are defined under a common object framework based on the CIM object model. Scripts can use one API (WMI) to access information for disparate sources such as the Win32 API, Windows NT Event Log, the registry, performance counters, device drivers, SNMP and, of course, the Active Directory. You can also write scripts for ASP and HTML pages in Windows Scripting Host (WSH) languages;
- Remote Administration - Objects managed within WMI are by definition locally and remotely available to applications and scripts. No additional work is needed to manage remote objects;
- Discoverability and Navigation - Applications and scripts can discover what information is available about a system by enumerating available classes. You can detect relationships between related objects and traverse them to see how one managed entity affects another;
- Query Capability - WMI manages data much like a relational database so you can submit SQL queries that filter and focus data of interest;
- Powerful Event Publication and Subscription - You can request events for virtually any change in the managed objects in the system - event those that do not support an internal event capability. Event subscribers can request notification of very specific events rather than receiving a set of events that were predefined by the original developers. The architecture allows virtually any user-defined action to be taken upon the recipt of a given event.
WMI is complementary to Active Directory, bringing detailed information about an individual system together with the Active Driectory's distributed, enterprise-level view. Since there are many occasions where a script or application writer might be interested in collecting information or performing configuration based on both the Active Directory and WMI, it is extremely convenient to have both available in a common format. This integration is supplied by the WMI's Active Directory provider, which automatically discovers and maps the information stored in the Active Directory to a set of equivalent WMI classes that you view and manipulate the contents as if they were any other class.