• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

How to determine all users *NOT* already in a given group?

Of course, it's easy to see all users that ARE in a given group in Active Directory.  Is there a script or utility that will identify users that are NOT a member of a given group?
0
K A
Asked:
K A
1 Solution
 
LauraEHunterMVPCommented:
Not built-in.  You would need to write a script that will loop through each user in your AD database and compare it against the membership list of that group, and then probably log any that are missing to a text/CSV/whatever file. This process becomes more complicated if you need to chase nested group memberships, where one group can have another group (and thus the members of that group) as members.

Some good examples of testing for group membership for a single user (with examples that both do and do not chase nested group membership) can be found here: http://www.rlmueller.net/freecode1.htm
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now