Understanding WMI Scripting

Understanding WMI Scripting

Windows Management Instrumentation (WMI) is a standardized programming interface for managing computers, servers, and networks. Applications and scripts can use WMI to access information about almost any Windows resource, on the local machine or remotely. Although this topic focuses on WMI scripting, WMI is also the interface used by Microsoft Management Console (MMC) for GUI-based management of Windows resources.

Use either scripting or MMC to administer Microsoft Speech Server (MSS). Each tool is appropriate for specific tasks.

For information about administrative server scripts, see Running Server Scripts.

  • Use MMC for simple system tasks, such as starting or stopping a server, and for basic feature-level tasks, such as checking individual performance counters.

  • Use WMI scripting for tasks, such as saving and loading configuration settings, monitoring servers, starting and restarting servers, or triggering an action when a server shuts down. For examples of how to use WMI scripting with MSS, see Using WMI Scripting with Speech Server. The sample scripts are located in \Program Files\Microsoft Speech Server\Administrative Tools\Scripts.

Background

WMI was originally released as an add-on component with Microsoft Windows NT 4.0 Service Pack 4. It is now built into Microsoft Windows XP and the Windows Server 2003 family of operating systems. WMI originated from the Web-based Enterprise Management (WBEM) initiative and the Common Information Model (CIM) adopted by the Distributed Management Task Force (DMTF). WMI includes the managed objects that are defined by CIM, as well as extensions to the CIM model for additional information available from the Windows platform. WMI uses a single consistent, standards-based, extensible and object-oriented interface, which makes MSS extremely manageable.

Architecture

WMI is organized into three layers.

  • The lowest level contains the Windows resource that is managed by WMI. This is the "Managed System" in the following illustration. In this case the managed system is MSS.

  • The middle layer contains the WMI infrastructure, which has three parts:

    1. A custom provider, replacing the default Win32 provider. The provider extracts management information from MSS and maps it into WMI object classes. This is the "Provider" in the following illustration.

    2. The CIM object manager, which provides services like query processing and security.

    3. The CIM Repository, which provides namespaces.

  • The top layer contains consumers of WMI data, which are either management tools such as MMC, applications such as Microsoft Systems Management Server, or scripts. This is the "Management application" in the following illustration.

    mgnwmi01.gif

See Also

Using WMI Scripting with Speech Server | Running Server Scripts | Windows Management Instrumentation Reference