Solved

Exporting AD Information to Excel

Posted on 2014-03-10
7
190 Views
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
0
Comment
Question by:hyperbyte
[X]
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
7 Comments
 
LVL 21

Assisted Solution

by:RK
RK earned 100 total points
ID: 39917398
Hi,

Refer this http://www.petri.co.il/export-active-directory-user-information-to-excel.htm# which details about your requirement.

Hope this helps
0
 
LVL 21

Expert Comment

by:RK
ID: 39917407
0
 
LVL 18

Accepted Solution

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

Open in new window

/Tobias
0
Technology Partners: 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
powershell

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

Expert Comment

by:TobiasHolm
ID: 39917639
Notice: my script (one liner) above was for a command shell (CMD) in Windows Server 2008.
0
 
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 www.cjwdev.co.uk/Software/ADReportingTool/Info.html
0
 
LVL 2

Expert Comment

by:allen_rich
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
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ADFS Help 7 48
Active Directory Account getting mysteriously locked 13 69
Monitoring solutions 8 72
Impact to changing AD username 2 22
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In-place Upgrading Dirsync to Azure AD Connect
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 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