See correction to this article

The Metabase: Home of IIS Configuration
To use scripts to manage IIS, you need to know something about IIS's configuration store: the metabase. The metabase, which is similar to the registry, is a hierarchical data store that provides configuration data for IIS and its services (i.e., the World Wide Web Publishing Service—W3SVC, FTP, SMTP, Network News Transport Protocol—NNTP, IMAP, and POP3). The most popular way to view the metabase's configuration data is by using the Microsoft Management Console (MMC) Internet Information Services (IIS) Manager snap-in. This snap-in provides an easy-to-use management GUI that presents a simplified view of the metabase's hierarchy and structure. But to access the power of administrative IIS scripting, you need to look at the metabase in more detail than the GUI provides.

The IIS 6.0 metabase is a plain-text XML file, so you can view the metabase by opening metabase.xml (under %windir%\system32\inetsrv) in Microsoft Internet Explorer (IE). To modify IIS configuration, you can directly edit the .xml file. To do so, open a command line and type

net stop iisadmin /y

to stop the IISAdmin service. Then, type

notepad %windir%\system32\inetsrvmetabase.xml

to open the metabase in Notepad. Select Edit, Find from the menu bar and search for the string ServerComment. This search will return the entry ServerComment="Default Web Site". Change this entry to something such as ServerComment="My IIS 6.0 Site" and save the file. Open the IIS Manager snap-in (doing so automatically starts the IISAdmin service) and navigate to the Web Sites node. You'll see that your default Web site is now named My IIS 6.0 Site. (To edit IIS configuration without stopping and restarting the IISAdmin service, you can use IIS 6.0's Direct Metabase Edit feature; see "Related Reading" for more information.)

The IIS 5.1, IIS 5.0, and IIS 4.0 metabases, however, are binary files, so you don't have the luxury of simply reading the metabase in a browser. Instead, you can use IIS Metabase Explorer, a brand-new tool available in the Microsoft Internet Information Services (IIS) 6.0 Resource Kit—provided that your Web server also runs the Windows .NET Framework. For IIS 5.0 and later, Metabase Explorer also presents a more in-depth graphical view of the metabase than the IIS Manager snap-in provides. Metabase Explorer doesn't work with IIS 4.0, however, so for IIS 4.0 you need to use MetaEdit 2.2. (See "Related Reading" for information about downloading Metabase Explorer and MetaEdit.)

Prev. page     1 [2] 3 4 5     next page
CORRECTIONS TO THIS ARTICLE:
In Brett Hill and Thomas Deml's "Scripting IIS Administration" (December 2003, http://www.win netmag.com, InstantDoc ID 40713), a figure was identified incorrectly. In the print article, Figure 4 should be listed as Figure 3. We apologize for any inconvenience these errors might have caused.




You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

This example is in error "notepad %windir%\system32\inetsrvmetabase.xml" there is a missing "\" between "..\inetsrv" and "metabase.xml"

Roy E Jensen

In the middle of page 4, in

"...To find a site ID for an IIS 5.1 site, run the findweb.vbs script, which resides by default in the %windir%\Inetpub\Adminscripts folder...",

the script actually resides by default in c:\Inetpub\Adminscripts folder.

Hongliang Qiang

Found these articles very intuitive, thanks very much.

Anonymous User

Article Rating 5 out of 5

 
 

ADS BY GOOGLE