# 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 <file> -d "<dn>" -r (mailname=*) -l [properties] -p subtree</dn></file>

Where:
<file> is the csv file to dump the output to.
<dn> 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.

# Cheating at LDAP in MS Active Directory

adsiedit.exe allows you to click your way through the AD directory tree and view and edit attributes, in short. It's pretty handy for quickly getting the dn of an object when you're not entirely sure of the directory structure to begin with. It's all rather self-explanatory and clicky friendly: