Exporting AD Information to Excel

Posted on 2014-03-10
Last Modified: 2014-04-24
Hello, I have a Windows Server 2008 DC and want to export a list of all the users along with their email address and telephone number information from AD.  Can some one please provide a script on how to do this?

Thank you
Question by:hyperbyte
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
LVL 21

Assisted Solution

by:Radhakrishnan R
Radhakrishnan R earned 100 total points
ID: 39917398

Refer this which details about your requirement.

Hope this helps
LVL 21

Expert Comment

by:Radhakrishnan R
ID: 39917407
LVL 18

Accepted Solution

TobiasHolm earned 200 total points
ID: 39917433
dsquery user -name * -limit 20000 | dsget user -dn -display -samid -email -tel

Open in new window

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 14

Assisted Solution

by:Justin Yeung
Justin Yeung earned 200 total points
ID: 39917498

get-aduser -filter * -properties * | select-object Name,EmailAddreess,HomePHone,MobilePhone,OfficePhone | Export-csv c:\export.csv
LVL 18

Expert Comment

ID: 39917639
Notice: my script (one liner) above was for a command shell (CMD) in Windows Server 2008.
LVL 18

Expert Comment

by:Sarang Tinguria
ID: 39918658
Chris has a great GUI tool for all theese stuffs

Cjwdev | AD Info - Active Directory Reporting

Expert Comment

ID: 39919815
You could try this :

$Userlist = Get-QADUser -SearchRoot "OU=vhlusers,DC=vhl,DC=com"
$Report = @()
Foreach($user in $Userlist){
    $Userdata = Get-QADUser –Identity $user |
    Select FirstName, LastName, DisplayName, SAMAccountName, PhoneNumber, LastLogon
    $Report += $Userdata
$Report | Export-Csv –Path c:\UserReport.csv

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  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

Suggested Solutions

Title # Comments Views Activity
SYSVOL folder permission security best practice ? 14 134
Recover from a ISCSI Share In Windows 2 61
DNS logs 1 19
Duplicate SPN entries 1 17
Last week, our Skyport webinar on “How to secure your Active Directory” ( provided 218 attendees with a step-by-step guide for…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
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 …

739 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