CSVDE

CSVDE Imports and exports data from Active Directory Domain Services.

CSVDE command extracts information in a comma-separated value (CSV) format. You can use Csvde to import and export Active Directory data that uses the comma-separated value format. Use Microsoft Excel to open this .csv file and view the header and value information

Syntax

CSVDE Options

Options

-i Used for Import, default mode is export.
-f File specify File to import or export from
-s Server The domain controller in which the import or export operation need to perform.
-c String1 String2 Replaces all occurrences of String1 with String2. When you import data from one domain to another and you want to replace the distinguished name.
-v For verbose mode.
-j Path Log file location. The default is the current path.
-t PortNumber LDAP port. The default LDAP port is 389. The global catalog port is 3268.
-u Specifies Unicode format.
-d BaseDN Sets the distinguished name of the search base for data export.
-r LDAPFilter Creates an LDAP search filter for data export.
-p Scope Search scope. Search scope options are Base, OneLevel, or SubTree.
-l LDAPAttributeList Sets the list of attributes to return in the results of an export query.
-o LDAPAttributeList Specifies the list of attributes to omit from the results of an export query.
-g Omits paged searches.
-m Omits attributes, such as ObjectGUID, objectSID, pwdLastSet attributes.
-n Omits the export of binary values.
-k Ignores errors during an import operation and continues processing.
Object already exists
Constraint violation
Attribute or value already exists
-a [UserDN Password] Sets the command to run using the supplied user & Password Example…(“cn=user,dc=yourcompany,dc=com password”)
-b [UserDN Password] Performs a secure LDAP bind with the NEGOTIATE authentication method.

Example

Import a domain from a file YourDomain.csv and store a log in c:\temp folder
Csvde -i -f yourdomain.csv -j c:\temp

Export a domain to a file YourDomain.csv (Default mode is Export)
csvde -f yourdomain.csv

To export only the user account object attributes from a domain to a file named Users.csv, you can use the following command.
csvde -r objectClass=user -f users.csv