Go back to Knowledge Base
There are different solutions to export or importa data from Active Directory:
- Microsoft Tools:
- CSVDE is a command line tool, allowing to import and export data. I found interesting to develop it here, because I never remember the exact name of the parameters to export data. You can always find the information in Ative Directory, but it takes time to browse and find the correct value. I often use it when I want to export specific data, not the entire Active Directory.
- LDIFDE is a command line tool, allowing to import and export data. I usually use it to export or import the entire Active Directory information (as a backup, or before doing an important task).
- External Tools:
- Hyena is a graphical application, allowing to do a lot of different tasks (not only exporting and importing data in Active Directory). Using this tools, it become easy to export any kind of data and update it without writing any line of script.
CSVDE:
csvde -f c:\temp\exported_file.csv -r "objectClass=user" -d "OU=OUs,DC=domain,DC=com" -l "list_of_data"
- -f => destination file when exporting; source file when importing
- -r => we can filter by type of accounts
- -d => OU location in Active Directory (not needed if you want to select all data in Active Directory)
- -l => list of data to be exported or imported
- displayName
- givenName
- sn
- title
- description
- mail
- msExchHideFromAddressLists
- department
- physicalDeliveryOfficeName
- samaccountname
- whencreated
LDIFDE:
ldifde -f c:\temp\exported_file.ldf -s hostname -d "OU=OUs,DC=domain,DC=com" -p subree
- -f => destination file when exporting; source file when importing
- -s => server hostname
- -d => OU location in Active Directory (not needed if you want to select all data in Active Directory)
- -p => export data from subfolders
I hope this will help you exporting or importing data without needing to search for all detailed fields names in Active Directory. I only wrote most common fields, as I did not want to list all of them.
Go back to Knowledge Base
- Details
-
Written by Nicolas Buache
-
Created on Sunday, 08 January 2012
-
Last Updated on Sunday, 08 January 2012
-
Hits: 615