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
LVL 1
hyperbyteAsked:
Who is Participating?
 
TobiasHolmConnect With a Mentor Commented:
Hi!
dsquery user -name * -limit 20000 | dsget user -dn -display -samid -email -tel

Open in new window

/Tobias
0
 
Radhakrishnan RConnect With a Mentor Senior Technical LeadCommented:
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 RSenior Technical LeadCommented:
0
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.

 
Justin YeungConnect With a Mentor Senior Systems EngineerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.