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,

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,895 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 39,261 Reputation points

    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

    0 comments No comments