Share via


Module 3: Writing Administration Scripts that use WMI

This module references what you learned in Module 2, while writing basic WMI scripts to administer IIS metabase properties. With your scripts, you will be able to query site properties, map virtual resources to real resources, create sites and set properties, export metabase nodes, use associations to find metabase elements, and use two providers in one script. The WMI SDK is used to walk you through finding the objects and methods that you need to write your WMI scripts.

This module includes the following lessons:

Before You Get Started

You need a way to verify what methods and properties are available to what classes. Refer to the WMI SDK for the general WMI methods and properties. You can download the WMI SDK from Windows Management Instrumentation (WMI) SDK or view it online at Windows Management Instrumentation Platform SDK.

To verify what methods and properties are available to classes

  1. From the Start menu, point to All Programs, point to WMI SDK, and then click WMI SDK Documentation.
  2. In the left frame, double-click Windows Management Instrumentation, double-click WMI Reference, and then double-click Scripting API for WMI.

Because you are reading this page, you already have the IIS documentation open for referring to the classes, methods, and properties of the IIS WMI Provider.

If you want a reference to the language of your script, see Windows Script Documentation.

Lastly, you must have administrative privileges on the computer on which you run your WMI scripts.