title: IIS Enable the HTTP Keep-Alive in Powershell
body: <p>The page <a href="http://technet.microsoft.com/en-us/library/cc772183(v=ws.10).aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/cc772183(v=ws.10).aspx</a> explains how to Enable the HTTP Keep-Alive Response Header (IIS 7)</p>
  
  <p>I want to do this in <strong>Powershell</strong> by WMI</p>
  
  <p>It says:</p>
  
  <blockquote>
    <p>Use the following WMI classes, methods, or properties to perform this
    procedure:
    <strong>HTTPProtocolSection.AllowKeepAlive</strong> property</p>
  </blockquote>
  
  <p>I've tried:</p>
  
  <pre><code>PS &gt; Get-WmiObject -Class HTTPProtocolSection
  Get-WmiObject : Invalid class
  At line:1 char:14
  + Get-WmiObject &lt;&lt;&lt;&lt;  -Class HTTPProtocolSection
      + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
      + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
  </code></pre>
  
  <p>What's the right way of using this HTTPProtocolSection class and enabling AllowKeepAlive property?</p>