views:

56

answers:

1

I would like to automate the process of deploying a new build of an existing site and allow for me to go back to the previous version of the site easily. Up until this point I have been copying my new build to the production server and placing it into a folder with a build number associated with it. Through the IIS user interface I would stop the site and then change the physical path on the site pointing it to my new build. If for some reason I would need to back the changes out I would simply go back into IIS and stop the site and point it back to the previous build.

I see where I can use appcmd to stop and start the site. I just can't find any way to change the physical path property on the site.

Thanks for you help.

A: 

you could probably use powershell Intro to Power Shell for IIS7

EDIT: This Page has examples for creating websites and applications in IIS with powershell.

Based on the samples it should be something like this:

Set-ItemProperty IIS:\sites\DemoSite\DemoApp -physicalPath C:\DemoSite\DemoApp -type Application
Jimmie R. Houts