title: Cannot set application pool for site in IIS via appcmd
body: <p>I'm trying to set the application pool for a site via <code>appcmd</code>.</p>
  
  <ol>
  <li><p>I add a pool:</p>
  
  <pre><code>appcmd add apppool /name:"TestAppPool" /managedPipelineMode:Classic
  </code></pre></li>
  <li><p>I add a site:</p>
  
  <pre><code>appcmd add site /name:"MyTestSite" /physicalPath:C:\MyTestSite
  </code></pre></li>
  <li><p>Then I set a pool for this site:</p>
  
  <pre><code>appcmd set site /site.name:"MyTestSite" /[path='C:\MyTestSite'].applicationPool:TestAppPool
  </code></pre>
  
  <p>Here I get an error:</p>
  
  <blockquote>
    <p>ERROR ( message:Cannot find requested collection element. )</p>
  </blockquote></li>
  </ol>
  
  <p>What's wrong here?</p>