We help IT Professionals succeed at work.

active directory custom search that will show all email address's

dirkdigs used Ask the Experts™
hello all, i am looking for an active directory custom search that will list "E-mail address's"

so for example when i go to AD and right click the user object and look at properties. there is the email address's tab. under this tab is all the email address's listed as well as alias's.

is there an LDAP string I can use to print this for all users in the domain ?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

If you load Active Directory Users & Computers, then create a new query (define query) for user objects (with a value) and change the columns view to show the e-mail address attribute you can then export this list to a file using the “Export List” option (the tsv format usually provides the best results).


can you give more precise instructions.

No problem – Open Active Directory Users and computers, click on Saved Queries, then right click and select New\Query. This should load the New Query dialog box, enter a Name (such as all users list), Query root should be populated already. Then select “define query” click on the drop down next to Name and choose “Has a value” and select OK, this should take you back to the New Query dialog box. Select OK. You should then see a list of all user accounts that have a name (should include every valid account).  Then select View\Add/Remove Columns in the available columns (on the right) you should have the E-mail Address option, Select Add then choose OK. You should now have a column showing email addresses.

If you’re happy with the list right click on query name( under saved queries) and choose Export List…Change the save as type to Text (tab Delimited)(*.txt) and give it a name, then choose save.
This should make it easy to manipulate in Excel, etc.

Hope this helps


pretty good. thanks.

but i would like to list ALL email address's for EACH user.

The instructions above only show the primary SMTP.
Top Expert 2013

You may want to try it using adfind


adfind -default -f  "&(objectcategory=person)(objectclass=user)"  samaccountname mail proxyaddresses -nodn -csv > c:\users.csv

That should give you a list of all your users and their return their samaccountnames and proxyaddresses in a CSV format that you can use in excel.


There's also a vbs script on the followg page:


I've tested this and it appears to work correctly.