What Is Windows Management Instrumentation?
The Windows Management Instrumentation (Windows Management Instrumentation, WMI for short) consists of a series of extensions to the Windows Driver Model, which provides an interface to the operating system through which instrumentation components provide information and notifications. WMI is Microsoft's implementation of the Distributed Management Working Group (DMTF) 's Web-based Enterprise Management Class (WBEM) and Common Information Model (CIM) standards.
- Windows Management Tools (WMI) consists of a set of Windows driver models that are extended to. WMI allows
- The purpose of WMI is to define a series of environment-specific proprietary specifications that allow management information to be shared between management applications. WMI stipulates
- Because WMI uses a collection of CIMs and providers to extract manageable entities, the development of a provider implies several steps. The main steps can be summarized as follows:
- Create a manageable solid model
- Define a model
- Implement the model
- Create WMI provider
- Determine the type of provider to implement
- Determine the provider's hosting model
- Create a provider template with the ALT wizard
- Implement code logic in this provider
- Register the provider using WMI and the system
- Test the provider
- Create user sample code [1]
- since
- For those willing to develop one or more WMI providers, WMI provides many functions. This is the most important advantage:
- Automation interface:
Because WMI comes with a set of ready-to-use automation interfaces, all management functions supported by the WMI provider and its classes are supported by free out-of-the-box scripts. In addition to WMI class design and provider development, the Microsoft development and testing team does not need to create, validate, and test a script model because it is already provided from WMI.- .NET management interface:
Since the System.Management namespace relies on existing COM / DCOM pipelines, the created WMI provider and its set of WMI classes become automatically provided to all .NET applications (such as C #, VB.NET) that use the language independently ). In addition to WMI class design and provider development, the Microsoft development and test team does not need to create, verify, and test new assemblies to support the new namespace in the .NET Framework, as WMI already provides this support. free.- C / C ++ COM / DCOM programming interface:
As with most components in Windows, COM / DCOM programmers can take advantage of the functionality of providers developed at the COM / DCOM interface level. Like previous environments (scripting and .NET framework), COM / DCOM users only need to interact with a standard set of WMI COM interfaces to take advantage of WMI provider functionality and a set of WMI classes it supports. To make all management information available from native APIs, WMI provider developers only need to interact with a set of predefined WMI COM interfaces. This will make management information automatically available at the WMI COM level. Moreover, the scripting COM interface object model is very similar to the COM / DCOM interface object model, which makes it easy for developers to become familiar with the scripting experience.- Support for remote access via DCOM and SOAP:
More than simply providing local COM capabilities, management is all about remote, WMI provides DCOM transport. In addition, SOAP transport will be available in Windows Server 2003 R2 through the WS-Management program led by Microsoft, Intel, Sun Microsystems and Dell. This initiative allows remote execution of any script or use of WMI data through a specific set of interfaces that handle SOAP requests / responses. The advantage of a WMI provider developer is that when he exposes all functions through WMI, Windows Remote Management / WS-Management can also consume this information (the embedded object in the WMI instance is not supported in Windows Server 2003 R2, but it is Vista goals). All layered to WS-Management and CIM data model to SOAP mappings are available for free from WMI / WS-Management solutions. In the case where DCOM must be used, implementing DCOM requires deploying a proxy DLL on each client machine. Since WMI is provided in Windows operating systems after Windows 2000, these problems have been eliminated.- Support query:
WMI provides support for WQL queries out of the box. This means that if the provider is not designed to support queries, WMI supports it by using enumeration techniques outside the provider.- Event processing function:
WMI provides the ability to notify users of any events of interest. WMI uses the WMI Query Language (WQL) to submit WQL event queries and define the types of events to be returned. The event mechanism with all relevant callbacks is part of the WMI COM / DCOM and automation interfaces. Anyone who writes a WMI provider can provide this functionality to his customers for free. It is up to the consumer to decide how to use the management information exposed by the WMI provider and its related WMI classes.- Code template generator:
To speed up the process of writing a WMI provider that includes all COM / DCOM interfaces and related definitions, the WMI team developed the WMI ATL Wizard to generate code templates that implement the provider. The generated code is based on the WMI class model originally designed by developers. WMI provider developers will be able to interface the predefined COM / DCOM interface of the WMI provider with a set of interfaces of its native API to retrieve management information to be exposed. Exercises include filling in "blanks" in the provider code to create the required interface logic.- Predictability:
Predictability is an important concern for IT professionals, as it defines the ability of a person with a set of interfaces to manage Windows components, which can be intuitively applied directly to other manageable Windows components without relearning Everything goes up. Customer predictability is a real benefit because it increases return on investment (ROI). People who face such a situation, based on previous experience, just want things to work the same way. The increasing number of COM programming / scripting interfaces has a huge impact on predictability because it makes it difficult for customers to automate, manage Windows and leverage their existing knowledge. WMI with CIM solves this problem by always exposing the same programming object model (COM / DCOM, Automation, .NET), regardless of what the manageable entity is.- Protect existing customer investments:
Protecting customers and partners' investments motivates customers to invest in technology. Because Microsoft has invested heavily in writing WMI providers over the past few years, customers and partners have invested in tools that leverage the WMI capabilities of Windows. As a result, they will naturally continue to take advantage of these features without having to use a new set of specific interfaces for each Windows manageable component. A specific set of interfaces means having a specific set of agents or software based on a new model or developed in-house, especially interfaces specific to components or technologies. By taking full advantage of WMI's capabilities, customers and partners can leverage past work investments while minimizing development costs, learning curves and new discoveries.- Provide a logical and unified management model:
As briefly mentioned earlier, the model is based on an industry standard called CIM defined by the DMTF (http://www.dmtf.org). CIM's class-based model consists of a constructor and software developer that meets industry requirements. This means that not only does Microsoft take advantage of WMI capabilities, but any other third-party constructors or developers write their own code to fit the model. For example, Intel is doing this for some of their network driver adapters and software. HP is leveraging existing WMI providers and implementing its own WMI providers in their HP Open View Enterprise Management Software. IBM consumes the WMI management suite from Tivoli, and MOM and SMS also consume and provide WMI information. Finally, Windows XP SP2 uses WMI to obtain information status from anti-virus software and firewalls. [3]