how to compare a csv with users in AD

Renu Murali 21 Reputation points
2021-09-28T09:32:56.433+00:00

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.

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.
5,580 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,471 Reputation points
    2021-09-28T14:51:10.453+00:00

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.