LDAP – Group Query


All Groups
(objectCategory=group)

Groups without Members
(&(objectCategory=group)(!member=*))

Managed Groups
(&(objectCategory=group)(managedby=*))

Unmanaged Groups
(&(objectCategory=group)(!managedby=*))

Security Groups
(&(objectCategory=group)(groupType:1.2.840.113556.1.4.804:=2147483648))

Distribution Groups
(&(objectCategory=group)(!groupType:1.2.840.113556.1.4.804:=2147483648))

OR
(&(objectCategory=group)(sAMAccountType=268435457))

Universal Groups
(groupType:1.2.840.113556.1.4.803:=8)

Empty Groups
(objectCategory=group)(!member=*)

Mail Enabled Groups
(&(objectCategory=group)(mail=*)(!sAMAccountType=268435457))

Reference:
. LDAP tips #2: Searching for Groups

Advertisements
This entry was posted in Scripts. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s