Solved

Searching multilpe group memberships

Posted on 2008-10-28
2
170 Views
Last Modified: 2010-04-21
Hi,

We have an all staff email address, made up of individual users and other distribution groups (All Staff - Scotland for example).  i want to run a Query to find any users who are not part of the all staff distribution list.

I had a go at a few LDAP Queries, but I could not get past checking membership of a single group, example below.

(&(&(&(|(&(objectCategory=person)(objectSid=*)(!samAccountType:1.2.840.113556.1.4.804:=3))(&(objectCategory=person)(!objectSid=*))(&(objectCategory=group)(groupType:1.2.840.113556.1.4.804:=14))))(objectCategory=user)(!memberOf=all staff)(!memberOf=All Staff - Central)(!memberOf=All Staff - Northern Ireland)))

Cheers
0
Comment
Question by:LCPete
2 Comments
 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 500 total points
ID: 22826899
You're better off using some VBScript logic that will chase nested group membership, so that checking against the membership of "All Staff" will return true/false regardless of whether the user is a direct or nested member.

Some examples of scripts you can use to test for nested group memberships can be found here: http://www.rlmueller.net/freecode2.htm
0
 

Author Closing Comment

by:LCPete
ID: 31510760
Thanks for pointing me in the right direction.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

As network administrators; we know how hard it is to track user’s login/logout using security event log (BTW it is harder now in windows 2008 because user name is always “N/A” in the grid), and most of us either get 3rd party tools, or just make our…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now