Lesson 1: Navigating to the IIS WMI Provider in CIM Studio
To familiarize yourself most efficiently with the IIS WMI provider, review the information on managing IIS in IIS Manager, the IIS metabase schema and configuration file, the IIS Managed Object Format (MOF) file, and CIM Studio. As mentioned in Module 1, Lesson 1, most systems have management GUIs that are tedious to use if you have large amounts of data or frequent management tasks. But the GUI is the most modular way to learn how to manage a system, so it is used here as an orientation. The IIS metabase schema and configuration files are used to emphasize the difference between the structure of the IIS metabase and the data it contains that is unique to your machine. The IIS MOF file and CIM Studio give you a pictorial representation of the IIS WMI provider. If you have the tools for the IIS Resource Kit installed, another useful tool to have open is the Metabase Editor which acts like a CIM Studio for IIS ADSI interface; however, this tutorial does not reference the Metabase Editor tool.
To open IIS Manager
- From the Start menu, click Run.
- In the Open box, type inetmgr, and click OK.
For alternate methods to open IIS Manager, see IIS Manager.
Important If you incorrectly change data in the Metabase Schema file in its original location, IIS cannot function. Changing the Metabase Configuration File is allowed, and if done correctly, the results are the same as using IIS Manager to change properties and settings (see Editing the MetaBase.xml File While IIS Is Running). If you change the IIS MOF file, the IIS WMI provider cannot function. For safety reasons, the steps below instruct you to make copies of these files and work from the copies.
To open the IIS metabase schema file
- From the Start menu, click Run.
- In the Open box, type Notepad %systemroot%\System32\Inetsrv\mbschema.xml.
- From the File menu in Notepad, click Save As.
- In the File name box, type C:\mbschema, and click Save.
This saves the file to C:\mbschema.txt so you can safely modify the file without altering the configuration IIS.
To open the IIS metabase configuration file
- From the Start menu, click Run.
- In the Open box, type Notepad %systemroot%\System32\Inetsrv\metabase.xml, and click OK.
- From the File menu in Notepad, click Save As.
- In the File name box, type C:\metabase, and click Save.
This saves the file to C:\metabase.txt so you can safely modify the file without altering the configuration of IIS.
To open the IIS WMI provider MOF file
- From the Start menu, click Run.
- In the Open text box, type Notepad %systemroot%\System32\wbem\iiswmi.mof, and click OK.
- From the File menu in Notepad, click Save As.
- In the File name text box, type C:\iiswmi, and click Save.
This saves the file to C:\iiswmi.txt so you can safely modify the file without altering the configuration of IIS.
After you download the WMI SDK tools from from Windows Management Instrumentation (WMI) SDK on MSDN, WMI SDK should appear in the Start menu.
To open CIM Studio
- From the Start menu, click All Programs, point to WMI SDK, then click WMI CIM Studio.
This opens an instance of Internet Explorer containing the CIM Studio tool. You may get an error message that says "VBScript: Possible Version Incompatibility" if the tool is a pre-release version, but that is just a disclaimer until the final version is released.
Click OK. - When the Connect to Namespace dialog box appears, click Cancel.
This dialog box appears only the first time you open CIM Studio.
Anytime thereafter that you want to browse to a WMI namespace, you can click the button with the computer icon to the right of the Classes in dialog box in the main Internet Explorer window.
In this tutorial, the button with the computer icon is referred to in order to reduce confusion. - Click the button with the computer icon to the right of the Classes in dialog box.
The Browse for Namespace dialog box opens. - In the Machine name box, type \\ and the name of the machine on which IIS 6.0 is installed.
The default is the local machine name. - In the Starting namespace box, type root\MicrosoftIISv2.
This tells CIM Studio that you want to connect to the IIS WMI provider on the above machine. If you want to see a list of other providers that are accessible, leave the starting namespace as root. - Click Connect.
The WMI CIM Studio Login dialog box opens. - Click Options to view the entire dialog box.
- If the machine you are connecting to lists you as an administrator, you can leave the check box for Login as current user selected. If you aren't listed as an administrator, clear the Login as current user check box and enter an administrator user name and password in the appropriate fields.
- In the Impersonation level box, verify that Impersonate is selected.
- In the Authentication level box, verify that Packet is selected.
Select the Enable all privileges box only if you want to be able to change properties in the IIS metabase using CIM Studio. - Click OK to connect.
If an Access Denied error appears, check your user name and password to make sure they are correct. - If you left the Starting namespace box as root in step 5, the Browse for namespace dialog box opens again.
Expand the root directory to see all the available WMI providers, select MicrosoftIISv2, and click OK to connect to the IIS WMI provider. - The CIM Studio window loads all the classes for the IIS WMI provider in the left frame. All the classes that start with a "__" are inherited from the root namespace.
The other five classes are those that are defined in Module 1, Lesson 3. They are CIM_ManagedSystemElement, CIM_Setting, IIsStructuredDataClass, CIM_Component, and CIM_ElementSetting. Return to Lesson 3: Organizing Data from the IIS Metabase for descriptions of each class.
Related Topics
- To proceed to the next lesson in this module, see Lesson 2: Viewing the Properties and Methods of the IIS WMI Provider.