I am using the Compare-object command to compare a CSV file. I am successfully using this to find the difference between two csv files:
compare-object $yesterdays $todays -Property EMPLID,GROUP_NAME -PassThru|?{$_.SideIndicator -eq '=>'}|
?{$_.GROUP_Name -eq 'FacStaffStudents14Spring' -or $_.GROUP_Name -eq 'Students14Spring'} | select * -ExcludeProperty MIDDLE_INITIAL,SideIndicator| Export-Csv $getquota -NoTypeInformation
How would I also exclude entries if they got changed from group name FacStaffStudent14Spring to Studnets14Spring or vice versa?