Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a way to find the set of groups common to a list of users. I have a list of about 4 users I want to compare and find which groups they are all members of. Is there a quick way to do this in Powershell or via LDAP queries?

share|improve this question
For only 4 users why not open each user's properties side by side and see what groups they are in. It seems to me like you're looking for an overly complex solution to a simple problem. – John Gardeniers Jan 4 '11 at 23:05
Well they are in around 500 groups each.......I know I know its not ideal but its what it is. Hand comparing over 500 groups each would most certainly not be a simple issue. – Andrew Rice Jan 5 '11 at 18:10

You can dump the 4 users to text files using net user UserName /domain > out.txt and then compare them using something like windiff.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.