IIS WMI Provider
Any script or code that attempts to manage IIS using Windows Management Instrumentation (WMI) needs to access the IIS WMI provider objects. For example, if you want to change a Web site property in the metabase, you must instantiate the class called IIsWebServerSetting which is a child of the CIM_Setting class. For code examples that configure IIS using the IIS WMI provider, see Using WMI to Configure IIS.
The required files, Iiswmi.mof, Iiswmi.mfl, and Iiswmi.dll, come installed with IIS. Because WMI uses late binding, these files don't have to be on a remote computer that attempts to configure an IIS server. From a C++ application, you only need to include the Wbemcli.h file.
Note
There has been a change in the IIS WMI provider for Windows Server 2003 Service Pack 1 and Windows XP with Service Pack 2 that requires customers to update WMI-based scripts that operate over a remote connection. WMI-based scripts that do not encrypt the connection when administering IIS remotely fail with an Access Denied error (WBEM_E_ACCESS_DENIED, 0x80041003). You must use the AuthenticationLevel property.
For information on how to configure encryption in WMI-based scripts, see Encrypting Data When Running WMI-Based Remote Administration Scripts in the IIS Administration Guide.
In This Section
This section contains information about the classes that are implemented by the IIS WMI provider in the MicrosoftIISv2 namespace. For a list of commonly-used Windows WMI properties and methods, see Inherited WMI Properties and Methods.
Windows WMI Classes
The following Windows WMI classes are implemented in the MicrosoftIISv2 namespace but are already documented in the Windows Management Instrumentation Platform SDK.
Windows WMI Class |
Description |
---|---|
CIM_ApplicationSystem |
This class takes advantage of the way classes in WMI automatically inherit characteristics from WMI regular classes to pass on to child classes. Use the child IIsComputer (WMI) class for its useful methods. |
CIM_Component |
This is an association class that maps each element in the CIM_ManagedSystemElement class to another element in the CIM_ManagedSystemElement class so the elements can mimic ADSI containment. |
CIM_ElementSetting |
This is an association class that maps each element in the CIM_ManagedSystemElement class to its matching element in the CIM_Setting (WMI) class. |
CIM_LogicalElement |
This class carries inherited properties from the parent class through to the child classes. |
CIM_ManagedSystemElement |
An abstract class that contains the CIM_LogicalElement (WMI) class. In the IIS WMI provider, the CIM_LogicalElement (WMI) class contains elements that correspond to nodes of the IIS Metabase Schema. Each element contains read-only properties that relate to IIS metabase properties, and methods that work on the writable properties in the corresponding CIM_Setting class. |
CIM_Service |
This class, and the child classes Win32_BaseService (WMI) and Win32_Service (WMI) take advantage of the way classes in WMI automatically inherit characteristics from WMI regular classes to pass on to child classes. Use the child classes IIsNntpService (WMI), IIsPop3Service (WMI), IIsImapService (WMI), IIsSmtpService (WMI), IIsFtpService (WMI), and IIsWebService (WMI), to configure IIS services. |
CIM_Setting |
An abstract class that contains the IIsSetting class. The IisSetting class contains elements that correspond to nodes of the IIS Metabase Schema. Each element contains writable properties that relate to IIS metabase properties. |
CIM_System |
This class, and the child CIM_ApplicationSystem (WMI) class take advantage of the way classes in WMI automatically inherit characteristics from WMI regular classes to pass on to child classes. Use the child IIsComputer (WMI) class to manage backup files of the IIS metabase. |
Win32_BaseService |
This class, and the child Win32_Service (WMI) class take advantage of the way classes in WMI automatically inherit characteristics from WMI regular classes to pass on to child classes. Use the child classes IIsNntpService (WMI), IIsPop3Service (WMI), IIsImapService (WMI), IIsSmtpService (WMI), IIsFtpService (WMI), and IIsWebService (WMI), to configure IIS services. |
Win32_Service |
The Win32_Service (WMI) WMI class represents services on a Windows operating system. Use one of the IIS child classes IIsNntpService (WMI), IIsPop3Service (WMI), IIsImapService (WMI), IIsSmtpService (WMI), IIsFtpService (WMI), or IIsWebService (WMI), configure IIS services. |
Requirements
Server: Requires Windows Server 2003.
Product: IIS