How to create application pool from a template using the command-line

I'm trying to find a way to create application pools from the command-line by using another application pool as a template.  Has anyone found a way to do this?
LVL 1
TAGCLTSAsked:
Who is Participating?
 
TAGCLTSAuthor Commented:
I ended up using the the adsutil to create the application pools, then using the command again to change to the desired settings.
0
 
Dan McFaddenSystems EngineerCommented:
The only way I was able to accomplish this was to document the config wanted into something like a csv and have a script read in the line, split on commas and then use ADSI to create an AppPool and then modify the parameters of that AppPool.  I was looking for something like this and ended up build my own script to do this.

MS documents the methods for AppPools here: http://www.microsoft.com/technet/scriptcenter/scripts/iis/iis6/apps/default.mspx?mfr=true

I use a csv for the template that is formatted like so:  AppPoolName,Option1,Option2,Option3,Option4, ...

The script functions like so:
- read a line from template file
- do a split on the line
- call a function to create the AppPool
- call a function to modify the properties require on the AppPool
0
 
TAGCLTSAuthor Commented:
I'm not that great at VB scripting with files yet.
Do you have a sample of a script that would read the template file?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.