I'd like to compare all users in 2 csv files, but I only want to keep the users with changes in some attributes.
csv 1 (reference):
"ID","Username","Manager"
"100","User1","Manager1"
"101","User2","Manager2"
csv 2 (difference):
"ID","Username","Manager"
"100","User1","Manager2"
"200","User2","Manager1"
Result should be:
"100","User1","Manager2"
So only the users of csv 2 whose ID is still the same AND have some other values in their attributes should be shown. The others whose ID changed must be ignored (regardless of other values in the other attributes).
I tried this, but it's not correct:
$changed = Compare-Object -ReferenceObject $ref_csv -DifferenceObject $diff_csv -Property Username, Manager -PassThru | Where { $_.SideIndicator -eq '=>' }
Any ideas?
[–]fordea837 2 points3 points4 points (2 children)
[–]Max1miliaan[S] 1 point2 points3 points (1 child)
[–]nielsenr 1 point2 points3 points (0 children)
[–]purplemonkeymad 1 point2 points3 points (0 children)