title: Setting a website's application pool in IIS using Powershell
body: <p>I need a Powershell command that does the equivalent of adding a website in IIS, but need the bindings for the "Application pool":</p>
  
  <p><img src="https://i.stack.imgur.com/IBvxk.png" alt="enter image description here"></p>
  
  <p>So far I can add a website doing this:</p>
  
  <pre><code>New-Item iis:\Sites\swmarket -bindings @{protocol="http";bindingInformation="80:swmarket"} -physicalPath c:\inetpub\wwwroot
  </code></pre>
  
  <p>But I don't know how to set the "Application pool" in the new website. Any way to see all the bindings?</p>