Поделиться через


Using WMI to Configure IIS

This section describes a selection of programming tasks that are involved in using the IIS WMI provider to configure IIS. The classes, methods, and properties of the IIS WMI provider can be used to configure IIS from scripts or executables. Less common administration tasks are listed in Supporting Tasks for Configuring IIS.

The IIS WMI provider cannot be used without certain methods of the Windows WMI classes. For a list of the Windows WMI methods that are commonly used in IIS adminstration scripts, see IIS WMI Provider Architecture.

IIS 5.1 and earlier: The IIS WMI provider is not available.

Note

There has been a change in the IIS WMI provider for Windows Server 2003 Service Pack 1 and Windows XP 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.

To use WMI, you must start Windows Management Services to use WMI on your machine. To run Windows Management Services, you must have Administrator credentials.

To start Windows Management Services

  1. From the Start menu, click Run.

  2. In the Open box of the Run dialog box, type net start winmgmt, and click OK.

This section includes the following topics: