Compare-Object $(Get-Content .\TestDoc1.txt) $(Get-Content .\TestDoc2.txt) | Out-File .\TestDoc3.txt