How to find the SiteID in IIS5 and IIS6

Occasionally I need to explain how to find the SiteID / Site Identifier in IIS5 and/or IIS6 so I thought I would quickly blog on how to do that so that I have a page that I can reference rather than typing it out each time.

When running various scripts or command line utilities, it is fairly common to need the Site ID of a site in IIS.  Fortunately it is quite easy to find.

IIS5: In IIS 5 or 6, view the properties of the website and in the Web Site tab, click on the Properties button for the logging. At the bottom of the Extended Logging Properties window is the Log file name. It will be something like this: W3SVC38\exyymmdd.log. The Site ID is 38 in this case.

 

IIS6: The IIS5 trick still works, but in addition you can click on the Web Sites major heading in the left hand side of the IIS admin tool and view the "Identifier" on the right hand side for whichever site you need. This is also the same Site ID.

 

No Comments