The Authors Code Samples Articles Errata Room 101 Useful links  

"Craig and Gwyn bring their insight and experience with WMI to explain how easy it is to write powerful management applications through WMI on the .NET platform."

--Andy Cheung, Microsoft WMI Test Engineer

 

 

Developing WMI Solutions
A Guide to Windows Management Instrumentation

Contents
Chapter 1 : Introduction
Chapter 2 : Existing Management Frameworks
Chapter 3 : Windows Management Instrumentation
Chapter 4 : A Guided Tour of the Common Information Model Repository
Chapter 5 : Developing Class Schemas
Chapter 6 : Method Design and Schema Class Positioning
Chapter 7 : Developing Management Applications
Chapter 8 : Developing .NET Management Applications
Chapter 9 : Developing MMC Snap-ins
Chapter 10 : Developing WMI Scripts for Administrators
Chapter 11 : WMI Scripting and WMIC
Chapter 12 : Developing WMI Providers
Chapter 13 : High Performance Instrumentation

 

Chapter 1: Introduction

This chapter introduces the various concepts and terminology used in systems management, in particular, WMI. The chapter highlights the necessity for a unified management standard such as WBEM.

 

Chapter 2: Existing Management Frameworks


This chapter aims to introduce the goals of WBEM and systems management by examining two existing management frameworks, SNMP and DMI. Still in widespread deployment, both are introduced thoroughly from an architectural perspective and provide an introduction to the basic principles and rationale behind systems management prior to WBEM. The chapter ends by summarizing the characteristics considered desirable in a management framework and how they relate to WBEM.

 

Chapter 3: Windows Management Instrumentation

This chapter covers a lot of groundwork to bring you up to speed with WMI. It covers installation and the various components that make up the WMI toolset. It contains some detailed information on the WMI architecture and the various interactions between WMI subsystems. It introduces essential WMI vocabulary so that you can understand the WMI features from a high level perspective. The latter part of the chapter introduces some of WMI’s powerful query language facilities, including queries for data (management information), queries for events (notification of activity), and queries against the class schema (understanding relationships between management information).

 

Chapter 4: A Guided Tour of the Common Information Model Repository

The chapter continues to explain how to understand the various class schemas and the WMI tools provided by Microsoft. The class schemas describe virtually every aspect of a network, computer and its operating system, as well as the installed software. The chapter includes an in-depth tutorial that provides an extensive introduction to the skills you will need as either an administrator or a developer using the Common Information Model (CIM). The chapter also covers in detail how all the WMI building blocks fit together. It introduces namespaces, classes, properties, qualifiers, flavors, and associations.

 

Chapter 5: Developing Class Schemas

From a development point of view, a class schema is the most important place to start to use a standard management environment to manage your own software and hardware. Chapter 5, the first of two chapters in which we discuss this, also is applicable to system administrators who wish to understand more about interpreting a WMI class schema (perhaps for an administration script or simply to obtain information from a user’s PC). The chapter introduces schema design by approaching a case study from a project lifecycle perspective that discusses all the stages of the class schema development/design and offers lots of advice and tips along the way, right through to deployment.

 

Chapter 6: Method Design and Schema Class Positioning


Chapter 6, continues to develop the case study begun in chapter 5, focusing on interpreting and approaching subtle differences in schema design, such as whether to use a method or the WMI standard mechanism to create a management object. It offers advice about looking toward future management requirements in designing classes and their positions within the schema, on localizing schema and on a number of other topics.

 

Chapter 7: Developing Management Applications

Accessing the WMI management environment can be achieved in a number of ways. The first of the development-oriented chapters is aimed primarily at developers who need to use C++ and the Component Object Model (COM) to obtain and manipulate information in the management environment. Consider this example, one of the many reasons that you might want to do this: You need access to the management environment so that you can develop a tool, perhaps a user interface administration consol, to manage your application’s configuration. The chapter contains useful and concise code samples to demonstrate how easy it is to use WMI. It also contains discussion of a number of topics, including event notification, security, and accessing high-performance classes.

 

Chapter 8: Developing .NET Management Applications

This chapter is on a similar level to chapter 7, but focuses on how to use the classes in the .NET Framework using C#. The .NET Framework from Microsoft effectively is a new execution environment for applications. C# is a new programming language, ultimately designed to leverage developer productivity. Through the code samples, you’ll see how easy the .NET Framework makes management applications development. Virtually every class in the .NET Framework is discussed in detail.

 

Chapter 9: Developing MMC Snap-ins

The Microsoft Management Console (MMC) is Microsoft’s response to the need for a consistent user interface in which administrators can find all their management tools. The facility to have a similar look-and-feel across the administrative user interface and the fact that all administration tools can be found in one place mean that MMC helps administrators move towards a lower cost of ownership. This tutorial-style chapter follows the C++ and COM developer through each stage of MMC snap-in development. By the end of the chapter, you will see how to use WMI to access and manipulate Windows Services in a user interface designed for administration. One of MMC’s most powerful features is the capability to develop and extend other snap-ins to add your own administration facilities.

 

Chapter 10: Developing WMI Scripts for Administrators

This chapter is the first of two aimed primarily at the system administrator. It assumes that you have very little, if any, experience in writing scripts and, therefore, starts at the beginning. It introduces the tools available for system administration and progresses to the VBScript boot camp. The boot camp introduces different types of problems you might experience and the techniques used to solve them. It gives detailed instructions for installing the Windows Scripting Host to enable you to use the chapter’s sample scripts. By the end of the chapter, you’ll learn how to develop your own scripts to use WMI to access and manipulate the management environment.

 

Chapter 11: WMI Scripting and WMIC

This chapter builds on the lessons learned from chapter 10. From a systems management perspective (using a case study), you learn how to break down administration problems and the scripting approach that you should use to solve them. It discusses remote script execution, because organizational networks contain networked PCs. Windows Management Instrumentation Command-line (WMIC), a new command-line tool that allows administrators to execute tasks and queries against the management environment, exists in Windows XP. The chapter examines WMIC in detail and provides a framework that would be useful for quickly solving problems using WMIC. There’s also advice on a number of topics including how to debug scripts.

 

Chapter 12: Developing WMI Providers

This crucial chapter describes how software and hardware developers can write their own WMI providers, the gateway for developers to expose their own class schema. The chapter assumes that you have development skills in C++ and COM. It covers virtually all of the many types of providers that can be developed. The chapter implements a very simple fruit basket WMI instance provider in the beginning and progresses to method, event, permanent event consumer, property, and push providers. This chapter provides a solid grounding in developing WMI providers. The source code accompanying the book contains a WMI provider ATL-like framework for accelerating your provider development, although the chapter does not explicitly discuss it.

 

Chapter 13: High Performance Instrumentation

Finally, the book covers event tracing. a very little-known subject of the WMI toolset. Event tracing is a very powerful and high performance method of instrumenting applications. It allows applications to expose very detailed information about an operation or task. The operating system uses this technology to expose activity in the Windows kernel, security subsystems, and numerous other subsystems.

 

 

<< back to previous page | home

 

© 2002, wbem.co.uk - All rights reserved.
Website and materials contained herein © C.Tunstall & G.Cole
Designed by Raymond Sinaga.