|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Create a new site under IIS5+
Hello all,
I need to silently create, configured and activate a new site under IIS5+. After extensive research I have found the following series of commands in a batch file will do what I need: Code:
adsutil.vbs W3SVC ENUM /P W3SVC ::code here to parse command result, get last entry and increment number by 1 and place results into %LASTENTRY% & %SVINDEX% ::create server adsutil.vbs create_vserv W3SVC/%SVINDEX% ::copy settings from last entry adsutil.vbs copy W3SVC/%LASTENTRY% W3SVC/%SVINDEX% ::name the new site adsutil.vbs set W3SVC/%SVINDEX%/ServerComment "SiteNameGoesHere" ::set new site to listen on 443 for SSL adsutil.vbs SET W3SVC/%SVINDEX%/SecureBindings ":443:" ::set the root directory for the new site adsutil.vbs SET W3SVC/%SVINDEX%/Root/Path "C:\MyNewSite\root" ::start the new site adsutil.vbs START_SERVER W3SVC/%SVINDEX%/ Problem is that I find it hard to believe that something doesnt already exist in IIS admin scripts. Also parsing the output of the ENUM command could be flaky. So the question is does anybody know of a better way to do this? |
|
#2
|
|||
|
|||
|
Why is it hard to believe? Creating new websites silently isn't that common of a need afaik.
Anyway, Windows IT Pro magazine had an article a few months back with many handy iis admin scripts.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Create a new site under IIS5+ |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|