How do I change the physical path of web site in IIS7 with APPCMD?

后端 未结 5 1120
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-31 03:24

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?

5条回答
  •  春和景丽
    2021-01-31 03:53

    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

提交回复
热议问题