Announcement

Collapse
No announcement yet.

Need to extract first name, last name, user id & email address from AD

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need to extract first name, last name, user id & email address from AD

    Need to extract first name, last name, user id & email address from AD and pipe it into an excel spreadsheet.

    I am new to the dsquery and dsget command and I am unsure how to obtain this information.

    Any pointers would be appreciated

  • #2
    Re: Need to extract first name, last name, user id & email address from AD

    I have since found the command below which will give me email addresses but I still need first name last name user id all in a nice pretty spreadsheet.

    dsquery user -limit 1000 | dsget user -email >C:\Getuser.txt

    Comment


    • #3
      Re: Need to extract first name, last name, user id & email address from AD

      You could always just go to ADUC, select to view the columns you're looking for and then right click the OU or container where the user objects are and select "export to list". This will give you the option to export to CSV as well as several other formats.

      Comment


      • #4
        Re: Need to extract first name, last name, user id & email address from AD

        If any one else needs to do this try:

        dsquery user -limit 1000 | dsget user -EMAIL -DISPLAY -UPN >C:\test.xls

        Hope this helps someone

        Comment

        Working...
        X