User Tools

Site Tools


exchange:reporting_project:query_notes

LDAP

All Exchange Mailboxes

The Exchange System Manager uses the “displayName” attribute, not common name, therefore, the displayName must be included in the initial lookup. I think three fields is fine, CN, DN, displayName…

The base query to get all Exchange mailboxes is:

(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))))

Csvde

Csvde format for this query to retrieve CN's and displayNames:

csvde -f all_exchange.txt -r "(&(&(& (mailnickname=*) (|(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))))" -l cn,displayName

Output of that query is simple to parse, and looks like:

DN,cn
"CN=102 Philosophy,OU=SIS,DC=ais,DC=columbia,DC=edu",102 Philosophy,102 Philosophy

Queries required

All users with exchange mailboxes

csvde -f all_exchange.txt -r "(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))))" -l cn

Output: List of DNs,CNs. Process: Output insert statements for DNs and CNs Process: Output insert statements for OU

Manual export of CN with mailbox size from System Manager Process: Output update statements with mailbox size where CN=CN.

exchange/reporting_project/query_notes.1260363949.txt.gz · Last modified: 2009/12/09 08:05 by ben