How Do I Export Active Directory User Information To A CSV File?
Maybe your like
To export user information from Active Directory to a CSV file, you will need access to run the Comma Separated Value Directory Exchange (CSVDE) tool on a Windows Server running Active Directory in your domain.
Important: Intermedia does not provide support for CSVDE, dsquery, or any other aspects of data export from your server. For information and troubleshooting, see the article above.
- Exporting all user information
- Exporting information from a single organizational unit (OU)
- Finding the name and path of the OU
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:
- Open the Active Directory Users and Computers snap-in.
- Find the OU containing the users you want to export.
- 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=TestAccount,OU=Hosting,DC=exch080,DC=serverpod,DC=net"
Go back to top
Tag » Active Directory Structure Export
-
Exporting Data From An Active Directory Organizational Unit
-
Export Active Directory Structure - Spiceworks Community
-
Export AD Structure To CSV With OU Breakdown - TechNet - Microsoft
-
Exporting And Importing Active Directory OU Structures
-
How To Export Active Directory Users To CSV And Build Reports
-
How To Export Active Directory Objects To CSV - Netwrix
-
How To Export Active Directory Users To CSV - Netwrix
-
PowerShell Script – Active Directory Export And Import Tip - C
-
Export Active Directory Data To CSV, Excel, And More - ManageEngine
-
Create A Replica Of Your Prod AD Structure In The Lab - Tech Blog
-
Exporting GPOs - NetIQ Group Policy Administrator User Guide
-
Export AD Users To CSV With PowerShell - Active Directory Pro
-
How To Export Users From Active Directory - Admin's Blog - CodeTwo