Scripting IIS: Adding a Web Site

As part of a larger project, I need the ability to add a new web site. Part of this process required that I create a web site entry in IIS. This ended up requiring a bit of research, so I thought I would post my results.

The process mostly uses VBScript from Microsoft. I had to find scripts from two or three places on their site and combine them to get the whole thing to work as I wanted.

The big challenge was to make sure that the web site was created, started, and publicly accessible.

[More]

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
This sounds like a great feature for a developer system. Get a new project and automate creation of dev/test environments in non-manual process we use now. (Hosts file, Set up server on IIS, or Apache, etc.)
# Posted By John Farrar | 12/17/08 12:30 PM
Isn't there a way to use the .net integration to do this?
# Posted By Sami Hoda | 12/17/08 1:19 PM
good timing! i was thinking about it this days and was going to try to find a solution in the weekend LOL
thx man
# Posted By Ed | 12/17/08 1:47 PM
John,

Yes, it does...

Sami,

I thought so as well (still do, actually), but I wasn't able to figure it out. Most likely, I just missed something really obvious.

Ed,

Glad the timing worked out! Let me know if you have any questions.
# Posted By Steve Bryant | 12/17/08 2:28 PM
i made some small changes to your function, but the description got to be too long, so i made it as a separate post that can be seen here: http://blog.1smartsolution.com/index.cfm/action:po...
# Posted By Ed Tabara | 12/17/08 4:31 PM
Ed,

I like that change a lot.

As an aside, I had to disable JavaScript on my browser (FF3) to get your blog to load.
# Posted By Steve Bryant | 12/17/08 5:04 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.