Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

In relation to your response on How do I change physical path of virtual directory in IIS6 through command line?.

Your answer was to run the following line of code:

cscript adsutil.vbs SET W3SVC1/WebSiteNum/Root/Vdirname/Path "new physical path"

Pardon the ignorance, but what is the <WebSiteNum>? How can I find it? I am assuming <Vdirname> is the virtual folder name. "W3SVC1", "Root" and "Path" are reserved words and use as is on the command line, correct? Does the new physical path need to be enclosed in double quotes as well?

share|improve this question

Every site in IIS gets a Site Number. An easy way to find that number is by opening the IIS manager, selecting Websites (or Sites in IIS7) and looking in the Identifier or ID column for the site you are interested in.

If you look at the log files, each site will have its own directory named W3SVCsitenumber.

Also, I believe the command would read

cscript adsutil.vbs SET W3SVC/WebSiteNum/Root/Vdirname/Path "new physical path"

Where it says 'Root' in the example, that will stay the same. In the case of relocating a Virtual Directory, I don't believe that you will need a path underneath Vdirname.

See this site for some details on adsutil.vbs

share|improve this answer

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.