Searching multilpe group memberships
Posted on 2008-10-28
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.1135184.108.40.2064:=3))(&(objectCategory=person)(!objectSid=*))(&(objectCategory=group)(groupType:1.2.840.1135220.127.116.114:=14))))(objectCategory=user)(!memberOf=all staff)(!memberOf=All Staff - Central)(!memberOf=All Staff - Northern Ireland)))