The most popular answer for this question involves the following Windows powershell 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 '<=').InputObject
$LeftSide | Set-Content C:\temp\file3.txt
Yet when I try to use that code, I get the following error:
Where-Object : Cannot bind argument to parameter 'FilterScript' because it is null.
Why am I getting this error, and how do I resolve it?