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
What I would like to do is filter this output further to exclude objects if the GROUP_NAME from $yesterday to $today was changed from FacStaffStudents14Spring to Students14Spring or from Students14Spring to FacStaffStudents14Spring. Do I need to incorporate if else statements somehow?