Compartilhar via


Windows Management Instrumentation (WMI) in IIS 7

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

IIS 7 uses Windows Management Instrumentation (WMI) to build scripts for Web administration. The IIS 7 WMI provider namespace, WebAdministration, contains classes and methods that enable you to script administration of Web sites, Web applications, and their associated objects and properties.

With appropriate delegation settings, you can use WMI scripts in IIS 7 to access, read, and modify key configuration files such as ApplicationHost.config and Web.confg. You can add or remove modules at the global or section level, and configure commonplace features such as custom HTTP errors, Mime Maps, SSL bindings, and ASP settings by using the IIS 7 WMI provider.

WMI scripting continues to be important in IIS 7 for automating frequently repeated tasks such as creating Web sites, but it can also take advantage of the new features exposed by the Runtime Status and Control API (RSCA) to monitor and diagnose sites. For example, you can monitor HTTP requests, worker processes, application pools, and application domains by using WMI scripting. You can also access the new diagnostics and troubleshooting features in IIS 7, such as failed request tracing, by scripting the IIS 7 WMI provider.

See Also

Concepts

IIS Manager (IIS 7)

Other Resources

IIS WMI Provider Reference