I believe this is a duplicate question. Here's what I think is the original: power-shell-script-to-compare-2-csv-and-give-only.html
how to compare a csv with users in AD
Renu Murali
21
Reputation points
Hello Everyone,
I have a task to be accomplished.Where i have a csv which contains list of the users. I have to compare these users with the AD to find active users and inactive users in powershell.
I need to export active users into a csv and inactive to a secon csv.
How do i compare the csv to AD.
The common field for comparison is emailaddress.
any help would be appreciated.
Thanks & Regrads,
Renu.