title: Powershell: null file always generated (output of Compare-Object)
body: <p>The most popular answer for <a href="https://stackoverflow.com/questions/39338097/remove-lines-from-file1-that-exist-in-file2-in-powershell">this question</a> involves the following Windows powershell code (edited to fix a bug):</p>
  
  <pre><code>$file1 = Get-Content C:\temp\file1.txt  
  $file2 = Get-Content C:\temp\file2.txt   
  $Diff = Compare-Object $File1 $File2  
  $LeftSide = ($Diff | Where-Object {$_.SideIndicator -eq '&lt;='}).InputObject  
  $LeftSide | Set-Content C:\temp\file3.txt
  </code></pre>
  
  <p>I always get a zero byte file as the output, even if I remove the $Diff line.</p>
  
  <p>Why is the output file always null, and how can it be fixed?</p>