• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

Exporting AD Information to Excel

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
hyperbyte
Asked:
hyperbyte
3 Solutions
 
Radhakrishnan RITCommented:
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
 
Radhakrishnan RITCommented:
0
 
TobiasHolmCommented:
Hi!
dsquery user -name * -limit 20000 | dsget user -dn -display -samid -email -tel

Open in new window

/Tobias
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Justin YeungCommented:
powershell

get-aduser -filter * -properties * | select-object Name,EmailAddreess,HomePHone,MobilePhone,OfficePhone | Export-csv c:\export.csv
0
 
TobiasHolmCommented:
Notice: my script (one liner) above was for a command shell (CMD) in Windows Server 2008.
0
 
Sarang TinguriaSr EngineerCommented:
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
 
allen_richCommented:
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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now