Powershell Compare-Object
I have 2 lists – List1 contains names from a query; List2 contains names from directory. Trying to cleanup the directories that students are no longer with the college. So, I need names on List2 that are not on List1.
I’m using Compare-Object with PassThru; but, I’m getting the differences not just what’s on List2.
Is there a different way to achieve that?
Thank you
I have 2 lists – List1 contains names from a query; List2 contains names from directory. Trying to cleanup the directories that students are no longer with the college. So, I need names on List2 that are not on List1.I’m using Compare-Object with PassThru; but, I’m getting the differences not just what’s on List2. Is there a different way to achieve that? Thank you Read More