Search code examples
iisiis-10

using appcmd to set physical path of an IIS10 website


How can I use appcmd in IIS10 to set the physical path of a website?

Something like...

appcmd set site summit /[path='/'].path:c:\newpath

This is the setting I am trying to change...

enter image description here


Solution

  • You could change the site physical path using below command:

    appcmd set site /site.name:"site name" /application[path='/'].virtualDirectory[path='/'].physicalPath:"D:\newpath"
    

    enter image description here

    Do not forget to run the command prompt as administrator.