How to index IIS 7.0 Web sites in Windows Server 2008 by Indexing Service



We can use the following steps:


Install IIS 6 Management Compatibility



1. Click Start , point to All Programs , point to Administrative Tools , and then click Server Manager .

2. In the console tree of Server Manager, Expand Roles , and then right click Web Server(IIS). Click Add Role Services

3. In the Add Role Services Wizard, select IIS 6 Management Compatibility, and then click Next .

4. Follow the instructions in the Add Role Services Wizard to complete the installation.


Select the web site you want to search



1. In Indexing MMC right click your catalog and choose Properties.

2. Click Tracking tab.

3. Select the web site in “WWW Server” dropdown list.

4. Then click OK.

5. If you open the property page again, you will see that “WWW Server” field is still empty. But it is just a UI issue.

6. To verify whether you select the web site, please check the following values under the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\[Catalog Name]




Make sure the value IsIndexingW3Svc is 1 and the value of W3SvcInstance is your selected web site instance.

Set ContentIndexed metabase property



In Windows 2003 you can select the option “Index this resource” on the virtual directory if you want to index some web pages. But in Windows 2008 there is no administrative UI for you to enable this option. We have to use command line scripts:

1. Open a command prompt and change the current directory to %systemdrive%\inetpub\adminscripts.

2. Run the command: cscript adsutil.vbs set w3svc/[web site instance]/root/[virtual director]/ContentIndexed 1

For example, if you want to enable “Index this resource” on the virtual directory MyVIR of the default web site, you can run: cscript adsutil.vbs set w3svc/1/root/MyVIR/ContentIndexed 1


After you enable the above options, you can restart your indexing service. The indexing service will automatically check the IIS settings and generate the catalog.


Xin Jin