title: How to redirect the IF Else output to html file in powershell
body: <p>I have written code to get hypertreding status of Windows servers. I am not able to redirect the output to html file. Could you please help here:</p>
  
  <pre><code>$vCores = Get-WmiObject Win32_Processor | Measure -Property  NumberOfCores -Sum
  $vCores = $vCores.Sum
  $vLogicalCPUs = Get-WmiObject Win32_Processor | Measure -Property  NumberOfLogicalProcessors -Sum
  $vLogicalCPUs = $vLogicalCPUs.sum
      if ($vLogicalCPUs -gt $vCores) { 
         “Hyperthreading: Enabled”
      } 
     else {  “Hyperthreading: Disabled”
      }
  </code></pre>