Reputation: 1904
We have some security groups that are mail enabled. Because of that , I need a query within ADUC that will give me a list of all my mail-enabled security groups and distribution mail groups.
I am able to getting distribution mail groups LDAP query like below.
(&(&(&(objectClass=group)(!(groupType:1.2.840.113556.1.4.803:=2147483648)))))
Upvotes: 0
Views: 2505
Reputation: 338326
Wrapped for legibility (put it back in a single line for use in Active Directory Users and Computers):
(&
(objectClass=group)
(|
(&
(groupType:1.2.840.113556.1.4.803:=2147483648)
(mail=*)
)
(!
(groupType:1.2.840.113556.1.4.803:=2147483648)
)
)
)
In English:
objectClass
is "group", AND
groupType
is "security" AND mail
is set, ORgroupType
is NOT "security".But I assume something simple like the following would also work - after all, you are looking for groups that have an email address. The group type is completely irrelevant.
(&
(objectClass=group)
(mail=*)
)
Upvotes: 1