title: How to update "physical path" of a site on IIS 10 using Powershell?
body: <p>When creating a site I manage to set the path with the following line of code</p>
  
  <pre><code>New-WebSite -Name "mysite" -port 8084 -PhysicalPath "c:\inetpub\wwwroot" -ApplicationPool "myappPool"
  </code></pre>
  
  <p>I have tried to figure out how to update the path, nothing found via Configuration Editor. I thought I had it with the following command</p>
  
  <pre><code>Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter "system.applicationHost/sites/site[@name='mysite']/virtualDirectoryDefaults" -name "physicalPath" -value "c:\inetpub\wwwroot\mysite"
  </code></pre>
  
  <p>...but, it is not virtualdirectory I want to update, but the actual site...</p>