Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LDAP query for number of active mail boxes 1

Status
Not open for further replies.

jdeane

IS-IT--Management
Sep 21, 2001
229
GB
hi

Is there an LDAP query which I can run to count the number of enabled/active mail boxes, I'm not wanting to count mail boxes belonging to disable user accounts?

Thank you

Jon
 
jdeane,

The following query will return all Exchange enabled users (i.e. with mailboxes) exluding system mailboxes and disabled users:

(&(!cn=SystemMailbox{*})(&(&(!cn=SystemMailbox{*})(!userAccountControl:1.2.840.113556.1.4.803:=2))(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) )))(objectCategory=user)))))

Regards,

Michael
 
Perfect, Thank you, it works a treat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top