Solved

Searching multilpe group memberships

Posted on 2008-10-28
2
171 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

867 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

22 Experts available now in Live!

Get 1:1 Help Now