title: TCP Chimney command via Powershell
body: <p>I have the below that I have been trying to get to work but cannot at the moment. I want it to go through and get the output of netsh command but all I need are it to check three of the outputs.</p>
  
  <p>Here is the command output if I just run it:</p>
  
  <pre><code>netsh int tcp show global | where {$_ -match ': disabled'}
  
  
  Receive-Side Scaling State          : disabled 
  Chimney Offload State               : disabled 
  Direct Cache Acess (DCA)            : disabled 
  Receive Window Auto-Tuning Level    : disabled 
  ECN Capability                      : disabled 
  RFC 1323 Timestamps                 : disabled
  </code></pre>
  
  <p>Nowthen, if I run the below to get e.g "Chimney Offload State" and check it is set to DISABLED then it fails and go through to the ELSE statment saying it is set to ENABLED when it is not...any idea how to fix this please:</p>
  
  <p>Code:</p>
  
  <pre><code>clear
  $netsh = netsh int tcp show global | where {$_ -match ': disabled'}
  
  if ($netsh -eq 'Chimney Offload State               : disabled')
  {
      Write-Host "TCP Chimney disabled"
  }
  else
  {
      Write-Host "TCP Chimney is ENABLED - WRONG!!!"
  }
  </code></pre>