Script to create IIS6 web sites, virtual directories, multiple host bindings

Script to create IIS6 web sites, virtual directories, multiple host bindings

am 29.08.2007 01:34:27 von jj

Is there a VBS script or something out there that can create web sites
in IIS6 with multiple host header/ip/port bindings? And that can also
add virtual directories?

I need to migrate the about 100 web sites from an old IIS5 server to a
new IIS6 server, with pretty much the same settings (same source
folder paths and same virtual directory paths), different IP
addresses. Some of the sites have as many as several dozen host name
bindings. I actually have all of the information I need in a
database, so I could generate a batch file or VBS script, or whatever
else is needed to create these.

How best to procede?

Re: Script to create IIS6 web sites, virtual directories, multiple host bindings

am 29.08.2007 07:12:51 von David Wang

On Aug 28, 4:34 pm, JJ wrote:
> Is there a VBS script or something out there that can create web sites
> in IIS6 with multiple host header/ip/port bindings? And that can also
> add virtual directories?
>
> I need to migrate the about 100 web sites from an old IIS5 server to a
> new IIS6 server, with pretty much the same settings (same source
> folder paths and same virtual directory paths), different IP
> addresses. Some of the sites have as many as several dozen host name
> bindings. I actually have all of the information I need in a
> database, so I could generate a batch file or VBS script, or whatever
> else is needed to create these.
>
> How best to procede?


Use Built-in IIS6 commands:
- iisweb.vbs to create the Websites
- adsutil.vbs to add the ServerBindings
- iisvdir.vbs to create Virtual Directories

Search for help and information on how to use them in a batch file.
Open their source code if you are interested in writing a VBScript.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Script to create IIS6 web sites, virtual directories, multiple

am 29.08.2007 17:02:05 von walid

Wouldn't the "IIS 6.0 Migration tool" work for this scenario? You could
migrate all your sites using this tool and maybe use a tool to modify the
migrated IP addresses.

"David Wang" wrote:

> On Aug 28, 4:34 pm, JJ wrote:
> > Is there a VBS script or something out there that can create web sites
> > in IIS6 with multiple host header/ip/port bindings? And that can also
> > add virtual directories?
> >
> > I need to migrate the about 100 web sites from an old IIS5 server to a
> > new IIS6 server, with pretty much the same settings (same source
> > folder paths and same virtual directory paths), different IP
> > addresses. Some of the sites have as many as several dozen host name
> > bindings. I actually have all of the information I need in a
> > database, so I could generate a batch file or VBS script, or whatever
> > else is needed to create these.
> >
> > How best to procede?
>
>
> Use Built-in IIS6 commands:
> - iisweb.vbs to create the Websites
> - adsutil.vbs to add the ServerBindings
> - iisvdir.vbs to create Virtual Directories
>
> Search for help and information on how to use them in a batch file.
> Open their source code if you are interested in writing a VBScript.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>

Re: Script to create IIS6 web sites, virtual directories, multiple host bindings

am 30.08.2007 00:48:04 von jj

On Aug 28, 11:12 pm, David Wang wrote:

> Use Built-in IIS6 commands:
> - iisweb.vbs to create the Websites
> - adsutil.vbs to add the ServerBindings
> - iisvdir.vbs to create Virtual Directories
>
> Search for help and information on how to use them in a batch file.
> Open their source code if you are interested in writing a VBScript.

One missing piece... adsutil.vbs requires a site identifier. Is there
a script to retrieve it given a site name?

Is there a guide somewhere to all the IIS scripts that ship with
Windows Server 2003?

Re: Script to create IIS6 web sites, virtual directories, multiple host bindings

am 30.08.2007 04:11:04 von jj

On Aug 28, 11:12 pm, David Wang wrote:

> Use Built-in IIS6 commands:
> - iisweb.vbs to create the Websites
> - adsutil.vbs to add the ServerBindings
> - iisvdir.vbs to create Virtual Directories

Ok, I wrote a short script to get the site id using the friendly name,
so that problem's solved.

But I'm afraid adsutil.vbs just isn't going to cut it for adding
multiple server bindings. Some of the sites I have would require a
command line several thousand characters long. Is there no easy way
to _add_ a single binding?