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.113518.104.22.1684:=3))(&(objectCategory=person)(!objectSid=*))(&(objectCategory=group)(groupType:1.2.840.113522.214.171.1244:=14))))(objectCategory=user)(!memberOf=all staff)(!memberOf=All Staff - Central)(!memberOf=All Staff - Northern Ireland)))