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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

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

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
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 …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

696 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