I would like to setup IIS via a batch file. How do I set/add default pages to a website?

The files in the list of the Documents tab

link|improve this question
feedback

1 Answer

You can use appcmd.exe:

appcmd set config /section:defaultDocument /enabled:true|false

Check appcmd help at MSDN (or here) for more information.

link|improve this answer
I thought appcmd.exe was for IIS7? Does it work on 6 too? – kenny Aug 31 '11 at 23:36
@Kenny Is right, Appcmd doesn't come with IIS6 (it was introduces with IIS7). Not sure if you can use the II7 version on IIS6 or not. – techie007 Nov 18 '11 at 22:12
feedback

Your Answer

 
or
required, but never shown

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