Is there a way to script the creation of an IIS 6 website? I don't have access to powershell, so it would have to use regular commands, or cscript scripts.
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
|
This method works on Windows Server 2003 IIS 6.0:
Here is the link to the Microsoft TechNet Script Repository related to or Managing Web sites on Internet Information Server 6.0. Another useful TechNet article explains how to create an AppPool programmatically. Here is an alternative method, which works on Windows Server 2000 (IIS 5.0) too. Write a .vbs file:
If you want to add virtual directories, you could do it this way:
|
||||
|
|
|
You'll probably want to customise the website as well rather than leaving at its default settings. After much scrabbling around, this is what I came up with:
|
|||
|
|
|
I think PowerShell is really for IIS 7. Are you sure you want IIS 6 and not IIS 7? IIS 7 has the appcmd command which is somewhat difficult to use but works. |
|||
|