IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 30th, 2006, 02:06 PM
MrEyes101 MrEyes101 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 5 MrEyes101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 50 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old March 30th, 2006, 05:55 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,976 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 17 h 59 m 48 sec
Reputation Power: 802
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > Create a new site under IIS5+


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT