I have two CSV files. The first one contains the following headers and data:
Name,Email,OfficePhone
Bill,Bill@jump.com,123-456-7890
The second one contains just:
primaryEmail
Bill@jump.com
I would like to compare the two and remove any duplicate rows from the first file where the email in the first file exists in the second one. I'm trying to use compare-object, but not sure where to go from here.
$File1 = Import-Csv C:\it\newuser.csv
$File2 = Import-Csv C:\it\email.csv
Compare-Object $File1 $File2 -Property email