Shagglez
Shagglez

Reputation: 1522

How can I programmatically create new sites in IIS 6?

Currently whenever a new subdomain is created for the site, a new host header value needs to be added manually in IIS for it to work (needs to work with and without SSL). Is there a way to set host header value via API so that subdomains can be created without human intervention?

Upvotes: 2

Views: 613

Answers (2)

x0n
x0n

Reputation: 52420

For IIS 6, WMI will do the trick. Here's an example on Technet/MSDN:

Creating Sites and Virtual Directories, and Setting Properties Using WMI

http://msdn.microsoft.com/en-us/library/ms524913

-Oisin

Upvotes: 0

Related Questions