IIS 6.0 Add Host Headers in Bulk

IIS 6.0 Add Host Headers in Bulk

To add host headers in bulk (IIS 6.0) you will need these two scripts in C:\Inetpub\AdminScripts:

AppendHostHeaders.vbs chglist.vbs

Additionally you will need an input csv called “c:\sites.csv” that follows this format (id, sitename must be first line):

id, sitename 1, www.test.com 2042610413, www2.two.testing.com 2042610413, www2.two.www.test.com 1, www.testing.com Script: . . . → Read More: IIS 6.0 Add Host Headers in Bulk

Howto: Print Site IDs to File in IIS

First create a file called c:\listsites.vbs with the following content:

OPTION EXPLICIT DIM CRLF, TAB DIM strServer DIM objWebService TAB = CHR( 9 ) CRLF = CHR( 13 ) & CHR( 10 ) IF WScript.Arguments.Length = 1 THEN strServer = WScript.Arguments( 0 ) ELSE strServer = “localhost” END IF WScript.Echo “Enumerating websites on ” & . . . → Read More: Howto: Print Site IDs to File in IIS

Howto: Migrate IIS Sites to Another Server

First you need to install the  IIS 6.0 Migration Tool

For each Web site and virtual directory on the source server, you must create a corresponding Web site and virtual directory on the target server. Later in the migration process, you will copy the content into these Web sites and virtual directories. Create the Web . . . → Read More: Howto: Migrate IIS Sites to Another Server

Howto: Change siteid of website in IIS 6.0

The easiest way to change the IIS site id is to create a .bat file like this: (Assuming that 1135282223 was the id of your current site and 5 was the ID you’d like to have)

CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs STOP_SERVER W3SVC/1135282223 CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs MOVE W3SVC/1135282223 W3SVC/5 CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/5

What is %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs ? It is . . . → Read More: Howto: Change siteid of website in IIS 6.0