1
votes

I have written a power-shell script for deploying Web application to Win2k8(IIS 7) server, but i got to know that the production server is actually Win2k3(IIS 6), and the powershell script is not performing the functions that i want.

Currently the Deployment script only works for IIS 7.0

The powershell script performs following functions

  • Check whether Apppool exists

    1a) If not create Apppool with the credentials

    1b) If Apppool exists Stop the apppool

  • Run M-SDeploy Command to install the Web-application on the local machine

  • Bind the Web-application to Apppool(Created in step 1)

  • Start the Apppool

Is there any power-shell framework that can work on both IIS 6 & 7.0 OR do i need first check in my deployment script whether the target machine is WIN2k3 or WIN 2k8 and then run appropriate deployment script.

Please suggest me the best way to write compatible Deployment script for both IIS 6 & 7.0 and let me know if you need any more information

1
any final solution with full source code sample working about it ? - Kiquenet

1 Answers

0
votes

There have been a lot of changes between these OSes and IIS versions that anyone targeting a higher version is better off writing scripts that leverage the newer capabilities. Look through the source of Carbon - http://get-carbon.org/ to see if it can be of any help to your case. It uses appcmd for IIS steps, and might give you some pointers.