Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our website has a large number of virtual directories being used as redirects (aprox. 150+). We're in the process of making a dev site that will ultimately become our live site so those directories need to be copied over to the new site. I have seen scripts to create virtual directories, but I don't see a way to set them as redirects. Is there a way to move these directories and what they redirect to with a script, or within IIS itself?

share|improve this question
up vote 0 down vote accepted

The IIS 6 metabase is stored in an XML format, so you may be able to get away with slicing and dicing the XML files on the source and destination servers to get what you want.

Failing that, you could write a script using adsutil.vbs to enumerate all the directories on the source server and create them on the destination server. Setting a directory to do HTTP redirection involves setting the "HttpRedirect" metabase property with the destination URL and the appropriate flag (see

share|improve this answer
Thanks Evan. I know about the metabase, but I haven't heard much about playing with it other than a few horror stories. I'll take a look at that and the link. – CoreyT Apr 4 '11 at 19:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.