I need to change the physical path of a web site through the command line via the appcmd.exe tool, but I can\'t figure out the syntax. Can someone help?
The following works for me on IIS 7.5. It changes the physical path of the website:
appcmd set site /site.name:"website name" /application[path='/'].virtualDirectory[path='/'].physicalPath:"C:\new\path"
Type the following to get a complete list of properties that you can set:
appcmd set site /site.name:"website name" /?
Reference