Normally you do not need to be concerned about web site identifiers,
these are the actual ID’s that reference the web site to IIS. Normally
we just use the web site description such as Default Web Site or in my
case blog.crowe.co.nz or something similar.
But if you are interested in writing scripts you normally reference sites using the Web Site Instance ID.
In IIS 6 the IIS Manager shows you a column called Idenfitier and
this is the actual ID that references the web site. This was not
visible in Windows 2000 (IIS 5) or Windows XP (IIS 5.1) and we had to
use different methods to see the identifier.
Using IIS 7 on Windows Vista you can see a column called ID which is the Web Site Instance ID
The Default Web Site always has an identifier of 1.
All other web sites on IIS 6 have web site idenfieir’s that look
like random numbers. The fact is that this is not the case and the
identifier is generated based on the description of the web site. This
is so that if you have a server farm as long as the descripiton is the
same you will end up with the same web site identifier. See this article for more details on the way that these identifiers are generated.
Another way to identify the web site instance id is to look at the Logging Properties of a particular web site.
To change Site ID to 1 for Default Web Site —
CSCRIPT %SYSTEMDRIVE%InetpubAdminScriptsadsutil.vbs STOP_SERVER W3SVC/4 (current ID #)
CSCRIPT %SYSTEMDRIVE%InetpubAdminScriptsadsutil.vbs MOVE W3SVC/4 W3SVC/42 (new ID #)
CSCRIPT %SYSTEMDRIVE%InetpubAdminScriptsadsutil.vbs START_SERVER W3SVC/42