Exporting email addresses (and other stuff) from Exchange

csvde (CSV Directory Exchange) seems to ship with MS Exchange, so should be on anything running it. Syntax is:

csvde -f  -d "" -r (mailname=*) -l [properties] -p subtree

Where: is the csv file to dump the output to. is the dn of the OU you want the data from (the ‘d’ in csvde is the same as the one in ldap). [properties] are the properties you want to export. They’re field names in the csv file. -p specifies the seach scope (I used subtree, alternatives are Base and OneLevel)

There’s also the -j logfile option which I couldn’t make work. But I’m so amazing I didn’t need it.