Skip to main content

CSVDE (Comma Separated Value Directory Exchange) Command Line Utility

CSVDE is a command line utility that allows administrators to import and export, but not to modify or delete, entries into or from Active Directory Domain Services (AD DS) using LDAP(Light weight directory access protocol). You can see the help for this command line utility by typing csvde /? at a command prompt.

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]

Importing
When an administrator wants to import entries from a file into the active directory, [-i] in above syntax indicates the import switch. The file you reference after the -f switch should be a comma separated value file.
The first line of the file defines the LDAP object class and attributes that you plan to import from the file.

Exporting
In Windows Server 2003 R2 or earlier, there was [-e] switch to the command to indicate an export operation. In Windows Server 2008 and later, export is assumed if the -i (import) switch is not part of the command. The most basic command of CSVDE to export a list of objects in Active Directory to a file named Explortobjects.txt on the C: drive is:

csvde -f c:\Exportobjects.txt
One could then open the Exportobjects.txt file and review the contents,  but this would would show a large number of objects and attributes. Practically, administrator may just want to export a specific set of information from directory. For example, if an administrator want just to export mail contact records from ABC OU of the XYZ.com domain to a file named ABCUsers.txt, the command syntax would be as below:

csvde -f c:\ABCContact.txt -d "ou=abc,dc=xyz,dc=com" -r "(objectClass=contact)"

Note:
Basic command parameters are also listed in the Csvde Help in the TechNet Library.

Comments

Popular posts from this blog

LDIFDE (LDAP Data Interchange Format Directory Exchange)

LDIFDE (LDAP Data Interchange Format Directory Exchange) A previous article described about CSVDE usage. This article will walk you through another tool LDIFDE (LDAP Data Interchange Format Directory Exchange), it is also a command prompt-based tool similar to CSVDE to export information from Active Directory. LDIFDE and CSVDE both are the tools that can be used to export data from Active Directory, and for creating AD objects by using data presented in LDIF or CSV format. The exported data can be filtered

About Hari Shanker

Thanks for visiting my site! My name is Hari Shanker, this is my weblog about various technical subjects. cloud computing and the occasional personal topics too. PROFESSIONAL INFORMATION I’ve been in the Information Technology field for more than 16 years, starting out with desktop support. Along the way, I worked as a systems administrator, Active Directory Specialist, Azure Specialist. Most recently, I was the Solution architect for Microsoft Azure at Rackspace. Currently, I work for Cognizant as a Principal Architect for Cloud Transformation & Solutioning. PERSONAL INFORMATION I live with my parents in the New Delhi area. Much of my time remains busy in my office and activities on various technical forums. During my leisure time, I love to spend time with Family & Friends and spend holidays on Hill stations. DISCLAIMER Any views or opinions expressed here are strictly my own. I am a blogger who works for an organization/company, I am not an organiz...

How to check your SID's for Windows server

For an IT Professional it is quite common to have a virtual LAB environment and it is also common to face issue related to similar SID (Security Identifier) on multiple VMs on the network. Earlier there was a tool “ NewSID ” was being used to overcome from this problem but that’s been retired and not being supported by Microsoft anymore. The recommended way is to use “SysPrep” to change SID of any windows operating system. Before proceeding with “SysPrep”, it’s better to understand how to check SID!! There is a free tool can be downloaded from sysinternal called “ PsGetSID ” , I’ll show how easily one can check machine’s SID.