Csvde

Applies To: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012

Csvde

Imports and exports data from Active Directory Lightweight Directory Services (AD LDS) using files that store data in the comma-separated value (CSV) format. You can also support batch operations based on the CSV file format standard.

Syntax

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

Parameters

  • -i
    Specifies the import mode. If the import mode is not specified, the default mode is export.
  • -fFileName**
    Identifies the import or export file name.
  • -sServerName**
    Specifies the domain controller to perform the import or export operation.
  • -cString1 String2**
    Replaces all occurrences of String1 with String2 . You generally use this when you importing from one domain to another and the distinguished name of the export domain ( String1 ) must be replaced with the distinguished name of the import domain ( String2 ).
  • -v
    Sets verbose mode.
  • -jPath**
    Sets the log file location. The default is the current path.
  • -tPortNumber**
    Specifies a Lightweight Directory Access Protocol (LDAP) port number. The default LDAP port is 389. The global catalog port is 3268.
  • -dBaseDN**
    Sets the distinguished name of the search base for data export.
  • -rLDAPFilter**
    Creates an LDAP search filter for data export.
  • -pScope**
    Sets the search scope. Search scope options are Base , OneLevel , or SubTree .
  • -lLDAPAttributeList**
    Sets the list of attributes to appear in the results of an export query. If this parameter is omitted, all attributes are returned.
  • -oLDAPAttributeList**
    Sets the list of attributes to be omitted from the results of an export query. You typically use this when you export objects from Active Directory Domain Services (AD DS) and then import them into another LDAP-compliant directory. If the attributes are not supported by another directory, you can omit the attributes from the result set using this option.
  • -g
    Omits paged searches.
  • -m
    Omits attributes that cannot be written, such as the ObjectGUID and objectSID attributes.
  • -n
    Omits export of binary values.
  • -k
    Ignores errors during the import operation, and continues processing. The following is a complete list of ignored errors:

    • Object already exists.

    • Constraint violation.

    • Attribute or value already exists.

  • -aUserDistinguishedName Password**
    Sets the command to run using the supplied UserDistinguishedName and Password . By default, the command runs using the credentials of the user who is currently logged on to the network.
  • -bUserName Domain Password**
    Sets the command to run as UserName Domain Password . By default, the command will run using the credentials of the user who is currently logged on to the network.
  • -?
    Displays the command menu.

Remarks

  • Applications such as Microsoft Excel are capable of reading and saving data in the CSV format. In addition, Microsoft Exchange Server administration tools are also capable of importing and exporting data using the CSV format, as are many other non-Microsoft tools.

    The CSV format consists of one or more lines of data, with each value separated by a comma. The first line (sometimes referred to as the header) of the CSV file must contain the names of each attribute in the same order as the data in any line following the first line.

    Example:

    CN**,FirstName,SurName,**Description

    FirstUserLogonName**,1stUserFirstName,1stUserSurName,**Manager

    SecondUserLogonName**,2ndUserFirstName,2ndUserSurName,**President

  • You can use csvde -r to create an LDAP search filter for data export. For example, the following filter exports all users with a particular surname:

    csvde -r (and(objectClass=User)(sn=SurName))

Formatting legend

Format Meaning

Italic

Information that you supply

Bold

Elements that you type exactly as shown

Ellipsis (...)

A parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

A set of choices from which you must choose only one

Courier font

Code or program output

Additional references