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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Farhan KaziSystems 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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TG TranIT guyCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.