KB0013676: Export (and import) data from (to) Active Directory using CSVDE Tool.


Summary

CSVDE is a windows server tool that imports and exports data from Active Directory using files in CSV format.

Details

Extracting the data or a selection of the data from AD can be useful for administration or debugging purposes. 

CSVDE is a command line tool. The complete syntax is: 

Csvde [ -i] [ -f FileName] [ - s ServerName] [ - c String1 String2] [ -v] [ -j Path] [ -t PortNum ber] [ -d BaseDN] [ -r LDAPFilter] [ -p Scope] [ -l LDAPAttributeList] [ -o LDAPAttributeList] [ -g] [ -m ] [ -n] [ - k] [ - a UserDistinguishedName Password] [ -b UserName Dom ain Password]

KB_120007_1

KB_120007_2


Examples

1 ) Export all data from AD to the file output.csv. 

Use the command:
CSVDE –f output.csv 

This can be useful to get an overview of the data stored in AD.
Each row in the resulting CSV file is an object that is stored in AD
Each column in the resulting CSV file is an attribute of an AD object 

The option –r is an LDAP filter to determine the rows to be returned
The option –l is a filter to determine the columns to be returned 

2 ) Create a csv file w ith all the tokens stored in AD. 

Use the command:
csvde -f tokenlist.csv -s dc1.tst1.qa -v -r (objectclass= vasco-DPToken) 

–r (objectclass= vasco-DPToken) is an LDAP filter, that specifies to only export the objects that are Digipass tokens 

3 ) Create a csv file, containing all the users that have a Vacm an Middlew are account. 

Use the command:
csvde -f users-with-VMaccount.csv -s dc1.tst1.qa - v -r "(&(objectclass= user)(vascoCreateTim e= * ))"

-r "(&(objectclass= user)(vasco-CreateTim e= * ))" will return only the rows that are users and that have the attribute not set to blank; which means that a middleware account has been created: 

4 ) Create a csv file, containing all the users that have a Digipass assigned. 

Use the command:
csvde -f users-with-DP.csv -s dc1.tst1.qa -v -r "(&(objectclass= user)(vascoLinkUserToDPToken= * ))" –l DN,cn 

-r "(&(objectclass= user)(vasco-LinkUserToDPToken= * ))" will return all objects that are users and that have the attribute vasco-LinkUserToDPToken not set to blank. 

–l DN,cn will return only 2 columns: the Distinguished name and the common name 

CSV files can easily be viewed and manipulated with Microsoft Excell.

 

_________________________________________________________________________________________________________________

Security Status: External

Document type: How To 

Applies to: Authentication Server 

Old Reference: 120007