obatin user info from the Active Directory

Posted on 2009-04-24
Last Modified: 2013-12-05

I need to extract the following information from the AD for all our users:

First Name Last Name      Display Name      Description      Office      Telephone Number      E-Mail      Street      City      Postal Code      Country      Logon Name      Title      Department      Company      Manager

Can somebody please tell me what is the easiest of doing this? Ideally, I want to populate an excel spreadsheet with  the extracted info.

Note that users are spread in diffrent containers.

Many Thanks
Question by:bekosysadmin
    LVL 3

    Expert Comment

    Our mission: To export all users and computers into a file called adusers.csv and then to read this export data in Excel.

    Preparation: Open up a command prompt, I use Start, Run, CMD.

    Type this command:  CSVDE -f adusers.csv

    To see instantly the result of your command, type: notepad adusers.csv.  For a more useful view of your export, open a spreadsheet like Excel, click File (menu) Open, select: Files of Type and change to All files, now browse to the directory where you created adusers.csv.

    LVL 57

    Accepted Solution

    This is a long command because your output but first download adfind by MVP Joe Richards
    adfind -default -f "&(objectcategory=person)(objectclass=user)"   givenname sn displayname description physicaldeliveryofficename telephonenumber mail streetaddress L postalcode c samaccountname title department company manager -csv -nodn > C:\users.csv
    That users.csv file on your C drive now should be what you need. Please let me know how that looks.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Do you have users whose passwords are expiring and they are constantly calling you?  Well I sure did and needed a way to put an end to this.  We have a lot of remote users which would not be notified that their passwords were expiring since they wer…
    [b]Ok so now I will show you how to add a user name to the description at login. [/b] First connect to your DC (Domain Controller / Active Directory Server) SET PERMISSIONS FOR SCRIPT TO UPDATE COMPUTER DESCRIPTION TO USERNAME 1. Open Active …
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now