Microsoft Corporation
September 1998
Summary: This paper presents overviews of the Microsoft® Windows® Management Instrumentation (WMI) technology, an implementation of the Desktop Management Force's (DMTF) Web-Based Enterprise Management (WBEM) initiative, and the DMTF Common Information Model (CIM). It also highlights the advantages of using Windows Management Instrumentation when building management applications. This paper is intended for developers and development project managers.
Contents
Introduction
Common Information Model (CIM) Overview
Windows Management Instrumentation Technology
Windows Management Instrumentation Architecture
What the WMI SDK Provides
Conclusions
For More Information
Introduction
The Microsoft Windows Management Instrumentation (WMI) technology is an implementation of the DMTF's WBEM initiative for Microsoft Windows platforms that extends the DMTF CIM to represent objects that exist in Windows management environments. The CIM is an extensible data model that is used to represent physical and logical objects in a consistent and unified manner in a managed environment.
WBEM is an industry-wide DMTF initiative and technology that aims to provide a standardized way to access management information in an enterprise environment. Based on the CIM, WBEM enables the development of tools and technologies that reduce the complexity and costs of enterprise management. By providing such standards, WBEM contributes to the industry-wide efforts to lower total cost of ownership (TCO). TCO refers to the administrative costs associated with computer hardware and software purchases, deployment and configuration, hardware and software updates, training, maintenance, and technical support.
WBEM complements and extends existing management protocols and instrumentation such as the Simple Network Management Protocol (SNMP), the Desktop Management Interface (DMI), and the Common Management Information Protocol (CMIP). It does so by providing a point of integration through which data from all of these sources can be accessed.
The WBEM initiative was conceived and created by BMC Software Inc., Cisco Systems Inc., Compaq Computer Corp., Intel Corp., and Microsoft Corp.
Windows Management Instrumentation, Microsoft's implementation of WBEM-compatible technologies, provides fully integrated operating system support for uniform system and application management based on the CIM. WMI does this by providing a consistent and amply descriptive model of the operational, configuration, and status aspects of Windows NT®–based systems. This model can be used to instrument management applications that decrease the maintenance and lifecycle costs associated with managing Windows NT. When used in conjunction with other Windows NT management services, such as Microsoft Management Console (MMC) (see Endnote 1), WMI helps simplify the development of well-integrated management applications, allowing vendors to provide highly efficient, scalable management solutions for enterprise environments.
Additionally, the combination of local and remote event processing with a SQL-based query language to the information model enables the creation of solutions to complex management problems. Developers can also provide solutions by creating scripts in Visual Basic® or by using Windows Script (see Endnote 2).
This paper presents overviews of the CIM and the WMI technology and architecture. It also highlights the applications, Providers, Adapters, and ActiveX® Controls provided in the Windows Management Instrumentation SDK (previously called the WBEM SDK), and the advantages of using these technologies when developing management applications.
This paper is intended for developers and development project managers.
The Complexity of Administering Computer Networks
Computer networks are typically heterogeneous, distributed environments that include both legacy and state-of-the-art components. Managing networks is a complex and costly process because such diverse environments usually incorporate various operating systems, protocols, and client technologies, making it difficult to troubleshoot and repair malfunctioning hardware and software components.
Network administrators need well-instrumented applications and devices that provide adequate levels of manageability. Developers need a consistent way to provide instrumentation for drivers and applications that is more efficient and less time-consuming than current methods. The computer industry is well aware of these issues and is committed to providing methods and technologies to simplify and facilitate network management, and consequently lower TCO of computing environments.
The WMI technology and CIM address such management issues by providing a standard, uniform model for representing and accessing management information, to enable developers to easily create associations between applications, drivers, systems, devices, and network management information. Systems administrators can benefit by building management solutions that consolidate information from various managed objects or sources. Additionally, developers can create management services to process and forward data to the appropriate management tools for further action.
The next sections provide brief overviews of CIM, the Windows Management Instrumentation technology and architecture, and highlight the applications, Adapters, Providers and ActiveX Controls provided in the Windows Management Instrumentation SDK.
Common Information Model (CIM) Overview
The CIM, created by the DMTF as part of the WBEM initiative, is an approach to system, software, networks, and user management that is based on the object-oriented paradigm. CIM provides a standard, unified conceptual framework for describing physical and logical objects in a managed environment. It does this by organizing information into a hierarchical set of classes describing the objects in the managed environment. The Properties in each class describe the data encapsulated by the class. Objects can be related to other objects by using CIM association classes.
CIM includes the following information models:
- A core model—incorporates classes applicable to all management domains.
- Common models—incorporate classes common to specific management domains, independent of particular technologies or implementations. Common domains include systems, applications, devices, users, and networks. These models provide a basis for the development of management applications and include a set of base classes for extension into technology-specific areas.
- Extension models—these represent technology-specific extensions of the common models. These models are specific to environments, such as operating systems (for example, UNIX, or Microsoft Windows).
Object-Oriented Design and Constructs
One of the goals of the CIM model is to consolidate and extend existing management standards and instrumentation such as SNMP, DMI, CMIP, and so on. This is done by using object-oriented design and constructs.
Using an object-oriented approach provides:
- Object abstraction and classification—To decrease the complexity of managed domains, managed objects are defined and grouped into classes based on common properties, methods, and associations with other classes. Managed objects are either physical or logical enterprise components that are modeled in CIM. For example, a managed object can be hardware, such as a cable or system chassis, software, such as a database application, or other logical entities, such as computer systems, files, and devices.
- Object inheritance—By creating subclasses from the high-level, fundamental classes, developers can add the appropriate level of detail and complexity to the model. Subclasses typically inherit all the properties, methods, and associations of their higher-level parent classes.
- Ability to model dependencies, component associations, and connection associations—Using the object-oriented paradigm, the associative relationships between objects can be modeled directly. The ways in which such relationships are named and defined describe the semantics of the object associations. Properties of the associations can be used to provide additional semantics and information. Other management standards did not provide for natural associativeness between managed objects, instead using multidimensional arrays or cross-referenced data tables.
- Standard inheritable methods—Defining standard object methods (behavior), provides another level of abstraction. These methods in turn can be bundled with an object's data to provide encapsulation, providing additional flexibility. For example, you can enable or disable user access to an application or change the operational status of a software component or network device.
CIM aims to model all aspects of managed environments. By defining objects, and their properties, methods, and associations in a uniform manner, information from networks, devices, systems, and applications can be accessed more easily by management applications and more powerful management capabilities can be implemented.
The next sections describe the WMI technology and architecture.
Windows Management Instrumentation Technology
The management infrastructure of the WMI technology supports the syntax of CIM, the Managed Object Format (MOF), and a common programming interface. The MOF is used to define the structure and contents of the CIM schema in human- and machine-readable form. Windows Management Instrumentation offers a powerful set of services, including query-based information retrieval and event notification. A single COM programming interface with additional scripting support is used to access these services and management data.
With Windows Management Instrumentation, you can write management applications to:
- Access machine resources, such as system memory, available hard disk space, and so on.
- Access application information. For example, you can perform an inventory of current application installations on a client computer.
- Remotely administer an application.
- Process events, such as SNMP traps and Windows NT Event Viewer log events.
Additionally, you can write WMI Providers that expose management information from a network resource or a software application. Such WMI-enabled resources can in turn be managed by management applications. WMI Providers are described later in this document.
The goals of the Windows Management Instrumentation technology are to provide:
- Access to monitor, command, and control any entity through a common, unifying set of interfaces, irrespective of the underlying instrumentation mechanism. WMI is an access mechanism.
- A consistent model of Windows 2000 operation, configuration, and status.
- A COM Application Programming Interface (API) for providing and accessing management information.
- Interoperability with other Windows 2000 management services. This approach simplifies the process of creating integrated, well-architected management solutions.
- A flexible, extensible architecture. Developers can extend the information model to cover new devices, applications, and so on, by writing code modules called WMI Providers, described later in this document.
- Extensions to the Windows Driver Model (WDM) to capture instrumentation data and events from device drivers and kernel-side components.
- A powerful event mechanism that allows management events to be asserted and associated with other management information. These notifications can also be forwarded to local or remote management applications.
- A rich query language that enables detailed queries of the information model.
- A scriptable API which developers can use to create management applications. The scripting API supports several languages, including Microsoft Visual Basic development system, Visual Basic for Applications, Visual Basic, Scripting Edition (VBScript), Microsoft JScript® development software, and Perl. Additionally, you can use the Windows Script Host or Internet Explorer to write scripts utilizing this interface. Windows Script Host, like Internet Explorer, serves as a controller engine of ActiveX Scripting engines. Windows Script Host supports scripts written in VBScript, JScript, and Perl.
Windows Management Instrumentation Architecture
The architecture of the Windows Management Instrumentation technology consists of:
- A management infrastructure
- Managed objects
- WMI Providers
Management infrastructure
The management infrastructure includes CIM Object Manager (CIMOM) and the CIMOM Object Repository. Users use CIM Object Manager to handle communications between management applications and providers. The CIM Object Manager facilitates these communications by providing a common programming interface, the WMI API. This API supplies event notification and query processing services, and can be used from several programming languages, such as C and C++. The CIMOM Object Repository is a central storage area for the CIM schema information.
CIM Object Manager. The CIM Object Manager is the primary component in the WMI management infrastructure. The CIM Object Manager runs as a standard service that starts when the first client management application makes a call to the WMI ConnectServer interface and connects successfully and continues to run as long as management applications are actively requesting its services. After the last management application shuts down, so does CIMOM.
The CIM Object Manager supports the WMI API, a single programming interface that is used by management applications, Providers, and schema extensions. Based on COM, the WMI API enables these components to interact with CIM Object Manager using C and C++.
CIMOM Object Repository. The CIMOM Object Repository is a central storage area that holds CIM schema information. The repository can also hold static data, though it is not designed to be a large volume database for management data. Windows Management Instrumentation also supports dynamic data, which is data that is generated on demand. The CIM Object Manager, network administrators, and third-party developers can place schema information in the CIMOM object repository by using either the MOF language and its compiler or the WMI API.
Managed Object Format is a compiled language created by the DMTF that is used to define static or dynamic classes and instances. Classes and instances are defined using ASCII or Unicode text, and are placed in a file that is submitted to the MOF compiler, Mofcomp.exe. The MOF compiler then parses the file and adds the classes and instances defined in the file to the CIMOM Object Repository.
Managed objects
These are either physical or logical enterprise components that are modeled using CIM. Management applications access managed objects using the CIM Object Manager.
Management applications
Management applications are applications or Windows NT services that use or process information originating from managed objects. Management applications can access managed object information by making a request to the CIM Object Manager through one of the methods in the WMI API.
Using Windows Management Instrumentation technology, you can create management applications that implement numerous features, such as displaying system information, generating an inventory of network resources, and processing and responding to events. Windows Management Instrumentation supports various strategies to create management applications. For example, applications can use the WMI API to access the CIM Object Manager directly or they can access the CIM Object Manager indirectly by using one of the following methods:
- Hypertext Markup Language (HTML)—Web browsers can use HTML. An Internet Server API (ISAPI) layer provides support for HTML and communicates with the CIM Object Manager.
- Microsoft Open Database Connectivity (ODBC) Driver—Your database applications can use the ODBC driver to combine the ODBC database capabilities with the management capabilities of WMI. This driver enables an application to use various ODBC-based reporting packages and tools, including Microsoft Excel and Microsoft Access.
WMI providers
WMI Providers are standard COM and Distributed Component Object Model (DCOM) servers that function as mediators between managed objects and the CIM Object Manager. If the CIM Object Manager receives a request from a management application for data that is not available from the CIMOM object repository or for events, it forwards the request to a WMI provider. Providers supply data and event notifications for managed objects that are specific to their particular domain.
To implement a WMI provider, you should use one of the following supported server types:
- In-process dynamic-link libraries (DLLs)
- Microsoft Windows NT services, local or remote
- Standard executables (.exe files), local or remote
The Windows Management Instrumentation Software Development Kit (previously called the WBEM SDK) includes several built-in providers. These built-in providers (or standard providers) supply data from sources such as the system registry; they are described later in this document. The built-in providers include:
- PerfMon Provider
- Registry Event Provider
- Registry Provider
- SNMP Provider
- Windows NT Event Log Provider
- Win32® Provider
- WDM Provider
The following graphic illustrates the Windows Management Instrumentation architecture. The top of the diagram shows examples of management applications (such as a Web browser or set of MMC snap-ins). Applications typically access the COM interfaces directly to interact with the CIM Object Manager to make management requests, while others use additional access methods such as ODBC, Active Directory Service Interface (ADSI) interfaces, or the Windows Management Instrumentation scripting API (previously called WBEM Scripting) to make their requests. The lower part of the diagram shows examples of managed objects and associated Providers (such as the Windows Registry and the Registry Provider). Communication between CIM Object Managers on local and remote components uses DCOM.
.gif)
Figure 1. Windows Management Instrumentation architecture
What the WMI SDK Provides
The following sections highlight the applications, providers, adapters, and ActiveX Controls provided in the Windows Management Instrumentation SDK to assist developers in creating management applications to access management information on Microsoft Windows platforms.
Windows Management Instrumentation SDK Applications
The Windows Management Instrumentation SDK includes the following applications:
| Application | Description |
| WMI Object Browser* | An ActiveX application hosted in Microsoft Internet Explorer, designed for use by system managers. You can use WMI Object Browser to display the object tree for a CIMOM object repository, view and edit object details (such as properties, methods, qualifiers, and associations), and run selected methods. |
| WMI CIM Studio* | An ActiveX application intended for developers and advanced system managers. This application is particularly useful for those who are writing WMI Providers. You use WMI CIM Studio to display the class inheritance tree for a CIMOM object repository, view and edit class and instance information (properties, methods, qualifiers, and associations), and run selected operations. Additionally, this application provides wizards for generating and compiling MOF files and for generating framework provider code. |
| WMI Event Registration* | An application intended for developers and system managers that is used to display and modify the event consumers, filters, and timers for a given namespace and any bindings between filters and consumers. It provides a graphical interface for what may also be done programmatically. |
| WMI Event Viewer* | An application that displays CIM Object Manager-generated events for all instances of registered consumers. When CIM Object Manager generates events, these event objects are automatically sent to consumers registered for the object type.
You can use the WMI Event Viewer to:
- View CIM Object Manager-generated events and event information, for example, the event's date and time, class, point of origin, and a description.
- View event instance properties.
- Start the WMI Event Registration Viewer.
|
| WMI HTML Viewer* | An application that provides HTML-based browser views of a CIM Object Manager schema. This application is intended for system managers and developers, particularly those who are writing WMI Providers, who do not have access to Microsoft Internet Explorer with ActiveX. The HTML Viewer is automatically installed during a complete installation of the WMI SDK.
Note This interface requires Microsoft Internet Information Server (IIS) and an Internet browser. Because the HTML Viewer uses HTML frames, it is recommended that you use only Internet browsers that support frames, such as Microsoft Internet Explorer 3.0 and newer versions, and Netscape Navigator 2.0 and newer versions). If you have Microsoft Internet Explorer with ActiveX, use the WMI Object Browser. You can use the WMI HTML Viewer to:
- Display the class inheritance tree (schema) in a specified CIMOM object repository.
- Search for a specific class.
- Display the definition of an existing class, including its properties, qualifiers, and methods (or operations).
- Display instances of an existing class (standard or graphic views).
|
| WMI User Manager* | An application that allows you to create authorized WMI users and set their access permissions. You use this application to manage user authentication and access to CIM objects for WMI. |
| WMI Administrator* | An application that allows you to configure CIMOM object repository backups and to enable and configure logging. |
* These applications names previously used WBEM instead of WMI. For example, the WMI Object Browser was previously called the WBEM Object Browser.
Providers and Adapters
The Windows Management Instrumentation SDK also includes built-in object providers and application adapters. Management applications can use the built-in object providers to access data and event notifications from various sources, such as the system registry or an SNMP device. Using the application adapters, management applications written with various programming interfaces can access the CIMOM object repository without having to be rewritten.
The Windows Management Instrumentation SDK defines both application-specific or custom providers, and built-in providers. The application-specific providers are created by third-party vendors to communicate information about objects in their specific domain to the CIM Object Manager.
Built-in Providers
The built-in providers supply CIM Object Manager with information from various logical and physical sources, such as the system registry, the Microsoft Win32 subsystem, and SNMP devices. Built-in providers include the following:
- Performance Monitor Provider—Provides access to Windows NT Performance Monitor data.
- Registry Provider—Provides access to system registry data.
- Registry Event Provider—Sends events when changes occur to registry keys, values, or trees.
- SNMP Provider—Provides access to events and data from SNMP devices.
- Windows NT Event Log Provider—Provides access to data and event notifications from the Windows NT Event Log.
- Win32 Provider—Provides access to data from the Win32 subsystem.
- WDM Provider—Provides access to data and events from device drivers that conform to the WMI interface.
Windows Management Instrumentation ODBC Adapter
Applications can use the ODBC interface to access data in database management systems (DBMS) using Structured Query Language (SQL) as a standard. This interface allows developers to create applications without targeting a specific DBMS. The Windows Management Instrumentation ODBC adapter (previously called the WBEM ODBC adapter) provides a standard API that developers can use to obtain data from the CIM Object Manager.
DMI Provider
The DMI Provider integrates the modeling and manipulation of DMI information into WMI. This allows WMI applications to interact with DMI 2.0 Service Providers running on local or remote platforms—thus leveraging investment in DMI instrumentation and providing a path of migration from DMI to WMI.
SNMP support
SNMP is an earlier management protocol used between management stations and agents. Management information is stored in a database called a Management Information Base (MIB).
The Windows Management Instrumentation SDK includes the following components to provide SNMP support:
- Class, Instance, and Event Providers—These integrate the SNMP information processing capabilities into WMI. These Providers map MIB object values to property values in instances of CIM classes.
- SNMP Information Module Compiler—Compiles native SNMP schema information into the format used by the Common Information Model.
With the SNMP Providers included in the Windows Management Instrumentation SDK, your client applications can access static and dynamic SNMP information through the CIM Object Manager. The SNMP Providers include:
- SNMP Class and Instance Providers—These providers integrate the SNMP information modeling and processing into WMI. These SNMP providers map collections of object values to property values of CIM class instances.
- Two SNMP Event Providers—These Providers generate WMI events from SNMP traps and notifications. They report the same types of events, but in different formats.
ActiveX Controls
The Windows Management Instrumentation SDK includes a set of ActiveX Controls that use the WMI APIs to perform logically related functions. You can use the ActiveX Controls to provide graphical user interface (GUI) functionality in your WMI-based client applications.
The following table lists the ActiveX Controls included in the Windows Management Instrumentation SDK.
| Control | Description |
| Class Navigator Control | Displays a tree view of the class structure of the CIMOM object repository. |
| CPP Wizard Control | Generates C++ framework code for specified objects. |
| EventList Control | Displays events for which it is registered. |
| EventRegEdit Control | Provides a simple user interface for defining WMI event filters and consumers and for binding them to each other. |
| HmmView Control | Displays custom views of objects. |
| MOF Compiler Control | Compiles a specified MOF file. |
| MOF Generator Wizard Control | Generates an MOF file for specified objects. |
| Multiple Object Viewer Control | Displays the details for one or more objects in a table format. |
| Namespace Entry Control | Allows users to browse and select namespaces. |
| Navigator Control | Displays the associations between objects in the CIMOM repository. |
| RegEvent Control | Registers event filters. |
| Security Control | Provides login services for the WMI ActiveX controls. |
| Single Object Viewer Control | Displays the details for a specified object. |
| WMI Object Viewer Control (previously called WBEM Object Viewer Control) | Provides navigation features for the Single Object Viewer and Multiple Instance Viewer controls. |
Conclusions
Windows Management Instrumentation technology provides a consistent, uniform method for accessing management information. Using Windows Management Instrumentation, systems, networks, applications, devices, and other managed components in an enterprise can all be represented using the Common Information Model.
Windows Management Instrumentation technology approaches the management of systems and networks by applying the basic structures and concepts of the CIM object-oriented model. By using an industry standard and extensible object-oriented schema, developers can consistently and uniformly model computer systems, networks, devices, and applications. This allows data from diverse sources to be represented in a consistent, logical way and enables associations between the management data regardless of its type, content, or source of origin.
By providing a single point of access for all management information, interoperability between Windows 2000 management services, and a flexible and extensible architecture, the Windows Management Instrumentation technology greatly simplifies the process of developing new management applications.
For More Information
For the latest information on Windows NT Server, check out our World Wide Web site at www.microsoft.com/ntserver/ or visit the Windows NT Server Forum on the Microsoft Network (GO WORD: MSNTS).
More information on Windows Script Host is available at the following URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsoriWindowsScriptHost.asp.
For details on the Windows Management Instrumentation technology, refer to the >Windows Management Instrumentation SDK (previously called WBEM SDK).
Endnotes
1. Microsoft Management Console is a common console framework for system management applications. Its primary goal is to support simplified administration and lower cost of ownership through tool integration, task orientation, support for task delegation, and overall interface simplification. The MMC console hosts administrative tools called MMC snap-ins; the console itself provides no management functionality. (Click here to return.)
2. Windows Script Host is a language-independent scripting host for ActiveX scripting engines on 32-bit Windows platforms; it allows scripts to be run directly on the desktop or from the command prompt. Windows Script Host supports scripts written in both Microsoft Visual Basic Scripting Edition (VBScript) and Microsoft JScript. (Click here to return.)
-------------------------------------------------------------------------------------------------
© 1998 Microsoft Corporation. All rights reserved.
The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.