Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Create IIS Website

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,59883
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Create IIS Website
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Create IIS Website - 5/6/2008 7:20:00 AM   
  apanian

 

Posts: 1
Score: 0
Joined: 3/6/2008
Status: offline

I have the following script that I obtained from MS script site.  My issue is I would like to learn how to build on this script, but lack all the knowledge to do so...

Question 1:
arrBindings(0).IP = "192.168.1.1"
arrBindings(0).Port = "80"
arrBindings(0).Hostname = "localhost"

THese clearly are parameters for specific fields in the IIS website properties page.
There are other properties that I would like to be able to manipulate as well.

How do we get this information to know what the "read" check box for the Home Directory" tab is?

I just feel like things are kind of "made up" or "declared" but I don't know from whar "root" value/property

I hope I've made enough sense to get some replies.

thanks in advance.

' Create a New Web Site

strComputer = "."
Set objWMIService = GetObject _
   ("winmgmts:{authenticationLevel=pktPrivacy}\\" _
       & strComputer & "\root\microsoftiisv2")

Set objWebService = objWMIService.ExecQuery _
   ("Select * From IISWebService")

arrBindings = Array(0)
Set arrBindings(0) = _
   objWMIService.Get("ServerBinding").SpawnInstance_()
arrBindings(0).IP = "192.168.1.1"
arrBindings(0).Port = "80"
arrBindings(0).Hostname = "localhost"

For Each objItem in objWebService
   objItem.CreateNewSite "poeticWeb2", arrBindings, _
       "c:\inetpub\wwwroot\website"
Next
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Create IIS Website Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts