Changing the Site ID In IIS 6
By default IIS will assign a random Site ID to a website and does not provide any options on changing them. This article will explain how to manually make the change to a domain in IIS and allow you to change the Site ID to one that you specify.
- Log into your Windows 2003 server with Remote Desktop Connection.
- Since Windows does not provide a GUI for changing the Site ID, this will all take place at the command prompt, so you will need to drop into a command prompt by typing “Cmd” at the run prompt.
- Now that you are in the Windows Cmd prompt, which looks like MS-DOS. Before you make any changes, you will need to take note of the Site ID of the website / domain that you want to change. To do this, open up the IIS manager and view the Site ID. For this example we will say we are dealing with the site ID of 64575 and we want to change it to the Site ID of 27.
- To change the Site ID, you must first stop the domain / website by typing the following command:
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs STOP_SERVER W3SVC/ 64575
- Now that the domain / website is stopped we need to tell Windows to change the existing Site ID to your new Site ID. To do this, we now need to type the following command:
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs MOVE W3SVC/ 64575 W3SVC/ 27
- The existing Site ID has now been changed, so now we just need to start the domain / website by running the following:
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/ 27
- If you still have the IIS manager open, close it and then reopen it. You will see that the Site ID has now changed to the new ID you provided.