email

Wednesday, October 28, 2009

Query hidden mailbox users from Active Directory

In this post I will take you through few LDAP queries which you might find useful in your day-to-day administration.

To query list of hidden mailboxes:

(&(objectCategory=person)(objectClass=user)(msExchHideFromAddressLists=TRUE))

To query list of GAL visible mailboxes:
(&(objectCategory=person)(objectClass=user)(!(msExchHideFromAddressLists=TRUE)))

To query list of hidden mailboxes whose user account is enabled:
(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(msExchHideFromAddressLists=TRUE))

To query list of hidden mailboxes whose user account is disabled:
(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2)(msExchHideFromAddressLists=TRUE))


Grab the query you want and paste it in "Saved queries" option in Active Directory users and computers MMC(dsa.msc) to view the results.

You can write in comments here if you are looking for a custom LDAP query for your requirements. I will help you when I find time.

Happy Learning...,
Sitaram Pamarthi.

No comments:

Post a Comment