How to use CSVDE.EXE to back up and restore connection agreements

This article was previously published under Q276440
This article has been archived. It is offered "as is" and will no longer be updated.
This article describes how to use Csvde.exe to export and import Connection Agreement information.
Csvde.exe is a Windows 2000 command-line utility that is located in the SystemRoot\System32 folder after you install Windows 2000. Csvde.exe is similar to Ldifde.exe but it extracts information in a comma-separated value (CSV) format. This section describes the command-line parameters.

CSV Directory Exchange

General Parameters

-iTurn on Import mode (The default mode is Export)
-f filenameInput or Output file name
-s servernameThe server to bind to
(The default is the domain controller of the domain that is logged on)
-c fromDN toDNReplace occurrences of FromDN to ToDN
-vTurn on Verbose mode
-jLog file location
-tPort number (default = 389)
-u Use Unicode format

Export Specific

-d rootDNThe root of the LDAP search (defaults to Naming Context)
-r filterLDAP search filter (defaults to "(objectClass=*)")
-p searchscopeSearch Scope (Base/OneLevel/Subtree)
-l listList of attributes (comma-separated) to look for in an LDAP search
-o list List of attributes (comma-separated) to omit from input
-g Disable paged search.
-mEnable the Security Accounts Manager (SAM) logic on export
-n Do not export binary values

Import Specific

-kThe import continues to ignore "Constraint Violation" and"Object Already Exists" errors

Establishing Credentials

NOTE: If no credentials are specified, Csvde.exe binds as the currentlylogged on user by using Microsoft Security Support Provider Interface (SSPI).
  • For simple authentication: -a userdn [password | *]
  • For SSPI bind method: -b username domain [password | *]


If you want to perform a simple import of the current domain, use the following command:
csvde -i -f inpute.csv
If you want to perform a simple export of the current domain, use the following command:
csvde -f output.csv
If you want to export a specific domain with credentials, use the following command:
csvde -m -f output.csv
-b usernamedomainname *
-s servername
-d "cn=users,dc=domainname,dc=microsoft,dc=com"
-r "(&(objectCategory=person)(objectClass=user))"
To extract all existing Connection Agreements into one file, use the following parameters, for example:
csvde -f output.csv -d "cn=active directory connections,cn=microsoft
To extract individual Connection Agreements, specify the distinguished name (also known as DN) for the particular connector, for example:
csvde -f output.csv -d "cn=exchange to windows ca,cn=active directory
connections,cn=microsoft exchange,cn=services,cn=configuration,dn=domainname,dn=com"
To import this information and re-create Connection Agreements, delete the globally unique identifier (GUID) value from the output file for each of the Connection Agreements. You must do so because Active Directory stores the GUID values and does not allow another object to be created with the same GUID. A new GUID is generated for the Connection Agreement upon import. To locate the GUID, check the first line of the export file. The first line of the export file defines each field. The "Object GUID" data has been removed, but the comma that defines that field remains. Note the following example, where Input.csv represents the modified output file:
csvde -I -f input.csv

Article ID: 276440 - Last Review: 12/05/2015 22:18:18 - Revision: 5.2

Microsoft Windows 2000 Server, Microsoft Exchange 2000 Server Standard Edition

  • kbnosurvey kbarchive kbinfo KB276440