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 about how to configure encryption in WMI-based scripts, see Encrypting Data When Running WMI-Based Remote Administration Scripts in the IIS Administration Guide.