title: Using Powershell to create a web application in a folder that is not an application
body: <p>I want to create a web application in IIS that does not live at the root of the IIS site.</p>
  
  <p>i.e. MySite/beta/WebApplication.</p>
  
  <p>This is my starting point:</p>
  
  <blockquote>
    <p>New-WebApplication "WebApplication" -Site "MySite" -ApplicationPool "MyAppPool" -PhysicalPath "C:\Sites\MySite\beta\WebApplication"</p>
  </blockquote>
  
  <p>That creates me the physical structure I want <code>C:\Sites\MySite\beta\WebApplication</code> , but makes IIS look like this:</p>
  
  <blockquote>
    <p>MySite (IIS Web Site)</p>
    
    <blockquote>
      <p>WebApplication (IIS WebApplication)</p>
      
      <p>beta (Folder)</p>
      
      <blockquote>
        <p>WebApplication (Folder)</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>Is there a way this can be done via powershell?  I do not really want <code>beta</code> to be a web application, just a folder.</p>