IIS Web Sites

  • Thread starter Thread starter Toby Riley
  • Start date Start date
T

Toby Riley

How do you create a virtual website on a win2000 or 2003 server using
directoiry services. I need to set

Port
Header
HomeDirectory
Default Page
Tuning,
etc.

I have no problems doing virtual directories but the virtual web site
creation eludes me.


Thanks

Toby.
 
Hi Toby,

Based on my research and experience, the following Knowledge Base article
is useful to you. Please refer to it carefully.

HOW TO: Create a Virtual Web Server by Using an ADSI Script in IIS
http://support.microsoft.com/default.aspx?scid=kb;en-us;315599

You can find the mkw3site.vbs file in the "\Inetpub\AdminScripts" directory.

For your convenience, I have also written a simple code snippet for your
reference.

"...
Dim w3svc

Set w3svc = GetObject("IIS://localhost/w3svc")

Set NewWebServer = w3svc.Create("IIsWebServer", 3)

NewWebServer.ServerSize = 1
NewWebServer.ServerAutoStart = 1
NewWebServer.ServerComment = "Third Web Site"
NewWebServer.ServerBindings = Array(":1010:")
NewWebServer.SetInfo

Set NewWebServer = GetObject("IIS://localhost/w3svc/3")

Set NewDir = NewWebServer.Create("IIsWebVirtualDir", "ROOT")
NewDir.Path = "F:\Inetpub\AdminScripts"
NewDir.AccessRead = True
NewDir.SetInfo
NewDir.AppCreate (True)

NewWebServer.Start
..."

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Although Mr. Yang pretty much covered it all for you.

If you happen to need any additional help, you should try microsoft.public.windows.server.scripting
 
Back
Top