tags:

views:

265

answers:

2

Windows 2003/IIS 6...

I have a virtual directory on a web site that closely mirrors the configuration another virtual directory on the same site will need. Since we have multiple dev/staging/test/prod environments, I'd like to be able to export the values of one virtual directory and quickly fire one up on either the same machine (with a different name/source directory) or on another machine (with perhaps the same name/source directory).

Can that be done? I see you can export the configuration through the IIS manager, but it seems to have a lot of keys embedded in it and I'm not sure if that can be directly imported into a separate entity on the same/different machine, or if it's only used for backups in case the original gets corrupted and needs to be restored.

+2  A: 

Have you taken a look at the IIS6 Migration Tool yet? It may address your needs.

Jimmie R. Houts
Interesting. The sites I'd like to kick it between are in separate tiers that can't see each other, so I wonder if it can do a file export or needs direct line-of-sight to the target server. Thanks for the tip, I'll check it out.
Chris
+2  A: 

You may want to take a look at the sample VBScript files installed with IIS 6. On my system they are in C:\Windows\System32

Two in particular seem relevant to your question:

iisvdir.vbs - allows listing, creating, and deleting virtual directories locally or remotely. iiscnfg.vbs - allows exporting configuration for copying to another machine.

Neither one of these does exactly what you want, but it looks to me like they could be used as sample code to help you get to where you want.

davidcl