I have two csv. first one is for PC info.(pcinfo.csv)
R1234 has two PCs
Second one is for User-mail info(mail.csv)
R9876 has no mail address
I want to make master CSV based on User ID like as below;
$doc1 = import-csv c:\pcinfo.csv
$doc2 = import-csv c:\mail.csv
$outfile = import-csv c:\mail.csv
Compare-Object $doc1 $doc2 -Property ID -passthru | Where-Object{$_.SideIndicator -eq "=>"} | Select PCname, ID, Mail | Export-csv "c:\complete.csv" -NoTypeInfo
And it did not work properly