title: PowerShell script to create a site in IIS with Reverse Proxy to eg. http://localhost:9001
body: <p>I am trying to automate deployment of our .NET 5 GenericHost services. As they have both a WebAPI and long-running processes, IMHO it makes sense to deploy them as Windows Services and then create a IIS site that acts as reverse proxy. In short:</p>
  <pre><code>Browser ---------------------&gt; IIS site -----------------------&gt; WindowsService
           https:/somesite.com             http://localhost:9001 
  </code></pre>
  <p>My &quot;only&quot; problem in this setup is how to create the reverse-proxy IIS site using PowerShell. I have absolute zero experience with this part.</p>
  <p>I have figured out, that the IIS Module for PowerShell must be used. But I can't see if it gives access to <code>URL Rewrite 2</code>, which is the way I know how to do reverse proxy in IIS.</p>
  <p>Anybody know about the right documentation for this?</p>