?
Solved

Export Email address/Aliases from AD

Posted on 2008-06-12
16
Medium Priority
?
1,626 Views
Last Modified: 2012-05-05
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?
0
Comment
Question by:pbgormley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 3
  • +1
16 Comments
 
LVL 16

Expert Comment

by:LegendZM
ID: 21768078
0
 
LVL 23

Expert Comment

by:ormerodrutter
ID: 21768105
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).
0
 

Author Comment

by:pbgormley
ID: 21768173
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
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 16

Expert Comment

by:LegendZM
ID: 21768185
0
 

Author Comment

by:pbgormley
ID: 21768192
I tried that also and i keep getting an error at this part 'mailnickname,proxyaddresses' ??
0
 
LVL 23

Expert Comment

by:ormerodrutter
ID: 21768610
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
0
 
LVL 6

Expert Comment

by:Neiphin
ID: 21768830
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
0
 

Author Comment

by:pbgormley
ID: 21768953
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....
0
 
LVL 6

Expert Comment

by:Neiphin
ID: 21769042
proxyaddresses should export all SMTP addresses. It does for me even if a user has several SMTP setup.
0
 

Author Comment

by:pbgormley
ID: 21769073
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.
0
 
LVL 6

Expert Comment

by:Neiphin
ID: 21769250
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
0
 

Author Comment

by:pbgormley
ID: 21769332
Really frustrating i know...

tried both and same result :(
0
 
LVL 6

Expert Comment

by:Neiphin
ID: 21769402
ok, let me check here and come back to you later.
0
 

Author Comment

by:pbgormley
ID: 21769457
Cheers, I'd appreciate that.... Regards
0
 
LVL 16

Assisted Solution

by:LegendZM
LegendZM earned 800 total points
ID: 21775995
This website has a clip of code that will do exactly what you want. You just copy the code, modify it to your domain's need, save it as a VBS script and execute from command prompt.

http://www.petri.co.il/forums/showthread.php?page=2&t=7690

0
 
LVL 6

Accepted Solution

by:
Neiphin earned 1200 total points
ID: 21776882
Ok, lets try a different approach.
Download adfind from

http://smtp25.blogspot.com/2007/09/finding-proxyaddresses-with-adfind_09.html

http://joeware.net/freetools/tools/adfind/index.htm

The command to run is (this will dump out users, contacts etc).

c:>c:>adfind -b dc=dc1,dc=dc2,dc=dc3,dc=dc4 -f (proxyaddresses=smtp:*) name proxyaddresses


Hope this helps. If not, well.................

Regards
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question