I have two CSVs as following:
A
20180809000
20180809555
20180809666
20180809777
20180809888
File2:
A
20180809000
20180809555
20180809666
20180809777
I want to find difference of File1 - File2 which should output 20180809888. I tried the following:
$a1= Import-Csv -Path $file1 | select A
$a2 = Import-Csv -Path $file2 | select A
$a1| where {$a2 -notcontains $_}
But it outputs the entire file 1:
A
--------------
20180809000
20180809555
20180809666
20180809777
20180809888
I tried intersection also, but that outputs null.