Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.