I am Dale Hayter, a Microsoft and VMware certified Technical Consultant.

My blog has been built up over the years from my experience of working on an IT helpdesk and also from being out on-site.

How to export email addresses from Active Directory

A neat little command to dump out the whole of Active Directory users email addresses to the root of c: can be found below :-

dsquery * -filter "(&(objectCategory=person)(objectClass=user)(mail=*))" -attr mail displayname -limit 0 > c:\email_addresses.txt