ActiveDirectory - Export Data to CSV


1. To export all data from Active Directory into a file called test.csv

csvde -f test.csv


2. Export data in a specific DN

csvde -d "OU=MyOU,DC=domain,dc=local" -f test.csv


3. Export with filters


csvde -f test.csv -r "(&(objectClass=user)(objectCategory=person)"


4. Export data with filters and specific DN

csvde -d "OU=Directors,DC=domain,dc=local" -f test.csv -r "(&(objectClass=user)(objectCategory=person)"



5. Get data of some fields only

csvde -d "OU=Directors,DC=domain,dc=local" -f test.csv -r "(&(objectClass=user)(objectCategory=person)" -l " givenName, sn, mail"



For more information, read this article: http://www.techrepublic.com/blog/data-center/simplify-admin-tasks-by-exporting-active-directory-data-with-csvde/

Comments