Solved

Exporting AD Information to Excel

Posted on 2014-03-10
7
189 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
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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Synchronize a new Active Directory domain with an existing Office 365 tenant
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
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 …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

792 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