Link to home
Start Free TrialLog in
Avatar of pbgormley
pbgormleyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Export Email address/Aliases from AD

Hi there,

We've been asked by our Email scanning/filtering company to provide them with a list of email addresses from our OU.

I am looking for a way to export a CSV etc of all the email addresses (primary and secondary and aliases) from Microsoft Exchange or Active Directory. Is there a quick/easy method?
Avatar of LegendZM
LegendZM
Flag of United States of America image

The easiest way is to go to your Exchange server, open AD Users and Computers, click to expand the User container. Go to VIEW and select Add/Remove Columns and add the Email addresses and Email Aliases columns (or whatever you need).

Right click on the User container and choose Export List. You can select to export to either .txt file or .csv file (change the file type).
Avatar of pbgormley

ASKER

Thanks mate. That's almost it.

I have quite a few users with aliases, ie joe.bloggs@domain.com may also have another SMTP address as joe@domain.com, is there any way to export/extract these?

Cheers
I tried that also and i keep getting an error at this part 'mailnickname,proxyaddresses' ??
You can use CSVDE or LDIFDE utility to export user account detail.
http://www.ss64.com/nt/csvde.html
http://support.microsoft.com/kb/327620
Avatar of Neiphin
Neiphin

Try this CSVDE  command, It should give you all that you need in a csv file.

csvde -r "(objectclass=user)" -l dn,mailNickname,mail,ProxyAddresses -f c:\export.csv


regards
Thanks mate, tried that and its about 90% there but it doesn't export the email aliases that some users have.....

example.... joe.bloggs@domain.com also has another SMTP address as joe@domain.com that doesn't get exported, in some circumstances a user may 2 or 3 more.... I need them all unfortunately....
proxyaddresses should export all SMTP addresses. It does for me even if a user has several SMTP setup.
I used the code you suggested & it created the export.csv fine but only primary email addresses have been exported, i have the csv open in front of me.
that is odd,

Try the following, (only proxyaddresses)

csvde -r "(objectclass=user)" -l ProxyAddresses -f c:\export.csv

If that is no good try, (this will dump out all possible attributes)

csvde -r "(objectclass=user)" -f c:\AllADobjects.csv

Regards
Really frustrating i know...

tried both and same result :(
ok, let me check here and come back to you later.
Cheers, I'd appreciate that.... Regards
SOLUTION
Avatar of LegendZM
LegendZM
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial