How to export a list of users from Active Directory

Build a query

  • Open Active Directory Users and Computer
  • Select Saved Queries -> New -> Query
  • Give a name to your query
  • Select the root that contains all your users (be careful not to get computers as well)
  • Select Include subcontainers if required
  • Build a query string - if you don't know how, the simplest is Users -> Name -> Has a value

Export the data

  • Right click in the data section, select View -> Add/Remove Columns
  • Select 3 columns in the order of username, email, fullname e.g. User Logon Name, E-mail Address, Name
    • Make sure you remove the defaul columns
  • Right click in the data section, select Export List ..
  • Enter a filename
  • Change Save as type: to _Text (Comma Delimited)(*.csv)
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 27, 2007

    kyle says:

    If you want to get fancy, this "Custom Query" gets all Active Users (not disable...

    If you want to get fancy, this "Custom Query" gets all Active Users (not disabled), no groups, normal accounts, and password expires...

    (&(userAccountControl:1.2.840.113556.1.4.803:=512)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(userAccountControl:1.2.840.113556.1.4.803:=65536)))