To export user information from Active Directory to a CSV file, you will need access to run the CSVDE tool on a Windows Server running Active Directory in your domain. If you do not have access to run the command directly, please contact our support department for assistance.

Exporting all user information

To run CSVDE on a Windows Server running Active Directory, open the command prompt (go to Start > Run, then type cmd and press Enter). Type in the following command:

csvde -m -f AccountName_mailboxes.txt -r "(&(objectClass=*)(mail=*))" -l objectClass,member,displayName,memberOf,proxyAddresses,legacyExchangeDN,title,telephoneNumber,facsimileTelephoneNumber,mobile,homephone,givenName,company,userPrincipalName,co,c,physicalDeliveryOfficeName,postalCode,sn,st,streetAddress,title,wWWHomePage,description,l,initials,info,sAMAccountName

Go back to top

Exporting information from a single organizational unit (OU)

If you want to export only a single organizational unit (OU), type the following command in the command prompt, instead of the one shown above. In the command, change the "OU=,OU=,DC=,DC=,DC=" field to the correct OU that your mailboxes are stored in.

csvde -m -f AccountName_mailboxes.txt -d "OU=,OU=,DC=,DC=,DC=" -r "(&(objectClass=*)(mail=*))" -l objectClass,member,displayName,memberOf,proxyAddresses,legacyExchangeDN,title,telephoneNumber,facsimileTelephoneNumber,mobile,homephone,givenName,company,userPrincipalName,co,c,physicalDeliveryOfficeName,postalCode,sn,st,streetAddress,title,wWWHomePage,description,l,initials,info,sAMAccountName

Go back to top

Finding the name and path of the OU

To get a list of your organizational units that can be used in the command in place of "OU=,OU=,DC=,DC=,DC=", you can issue the following command from the command prompt window:

dsquery ou

Select the OU you would like to start the export for (all sub-units will be exported as well). For more information, please see this TechNet article.

Alternatively, you can use the following method:

  1. Open the Active Directory Users and Computers snap-in.
  2. Find the OU containing the users you want to export.
  3. Starting from the lower level OU, compose a path to the OU. Please see the following example:

 
 
In this example, if you wanted to import users from the OU "test", you would replace "OU=,OU=,DC=,DC=,DC=" in the command with:

"OU=test,OU=Hosting,DC=exch015,DC=msoutlookonline,DC=net"

Please note that we do not provide support for CSVDE, dsquery, or any other aspects of data export from your server. For information and troubleshooting, see CSVDE Help.

Go back to top