I have been trying to figure out how I would be able to write an application to deploy IIS configs to multiple WebServers. The web configurations will be taken from one environment and then be restored on one or more webservers. I have tried out the DirectroyServices API from .NET to manage IIS. I wanted to export all the configurations and the import them into another physical WebServer running the same version of IIS. The virtual directories where restored, but not all of its parameters were allowed. For example security properties with passwords that are set.
From what I found looking around it looks like the DirectoryServices API for IIS doesn’t implement all the features you need. I was able to Shell out AppCMD from my application. What I didn’t like about this is that I had to use a Remote Execution tool so remotely execute a batch script which takes care of the Restore and Backup of IIS.
Is there a better way to do this? I was looking into PowerShell to see if I can write a script to do what I need, but was wondering if that same script can also work for IIS 6 and IIS 7?
Thanks in advance for any input!