how to query/export Acitive Dicrectory data to excel

How do I query/export data (first_name, last_name, username, email address) from Active Directory (windows 2003 R2 single domain) to excel file?
Who is Participating?
Farhan KaziConnect With a Mentor Systems EngineerCommented:
You can use command line utility called CSVDE to export required information into .csv format that can be easily opened into Excel.

Click Start -> Run -> Cmd.exe -> OK
Following statement will create UserInfo.csv file.

Hope this helps!
CSVDE  -R "(objectCategory=user)" -L givenName,sn,sAMAccountName,mail -F UserInfo.csv

Open in new window

tgtranConnect With a Mentor Commented:
If you don't want to mess with command line tools like dsquery, ldifde..., you can do this using Active Directory Users and Computers (ADUC):
1.  Open ADUC and go to the OU you want to export
2.  Click View - Add/Remove Colums - and select/arrange the attributes you want to export
3.  Click Action - Export
All Courses

From novice to tech pro — start learning today.