I have a ton (about 300) of IIS sites on a server that need to be moved to a new Application Pool. I could do it programmatically using the C# DirectoryEntry class, but I'm wondering if there's any easier way?
|
feedback
|
|
ADSUtil.VBS is your friend here. You can use it to get a list of all sites on the system (which you will have to edit a bit to get the proper results), and to set the application pool for a site.
will give you a list of all paths on your server like this:
anything that ends with a number is a web site. After filtering that list, you can use it as input for another adsutil.vbs command:
Which will change the app pool for the web site specified by Writing a wrapper around this in your favorite language should be pretty trivial if you are already talking about using C# to do this. Also, if you aren't familiar with it, adsutil.vbs typically exists in | |||
|
feedback
|
|
Programmin,g definitely. Nothing easier. Did you check the scripting section at http://www.iis.net/? Powershell also comes to my mind... | |||
|
feedback
|
|
I wrote up a little tool to this based on the other answer. You can match the pools and sites based on regex, and it will divide them up evenly. You can download it here: http://www.netfuelinteractive.com/iis-application-pool-tools.aspx | |||
|
feedback
|
|
I wrote up a little tool to this. You can match the pools and sites based on regex, and it will divide them up evenly. You can download it here: http://www.netfuelinteractive.com/iis-application-pool-tools.aspx | |||
|
feedback
|