Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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 http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true

share|improve this answer
add comment

Your Answer

 
discard

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.