Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: MS DOS .: How to Import or Export Active Directory data to a file using CSVDE / LDIFDE commands (Directory Exchange)

How to Import or Export Active Directory data to a file using CSVDE / LDIFDE commands (Directory Exchange)

Import or Export Active Directory data to a file. The syntax of these two commands is identical, the difference being that one works with CSV files and one with LDIF files.

Syntax


   Export to file:
             CSVDE [-f FileName] [options]
            LDIFDE [-f FileName] [options]
Import from File: CSVDE -i [-f FileName] [options] LDIFDE -i [-f FileName] [options] Key -f Filename Input or Output filename -s servername The server to bind to -c FromDN ToDN Replace occurrences of FromDN to ToDN -v Verbose -j Path\LogFile Logfile location -t Port Number (default = 389) -? Help Export options -d RootDN The root of the LDAP search (Default to Naming Context) -r Filter LDAP search filter (Default to "(objectClass=*)") -p SearchScope Search Scope (Base/OneLevel/Subtree) -l list Attributes to look for in an LDAP search (comma separated List) -o list Attributes to omit from input (comma separated list) -g Disable Paged Search -m Enable the SAM logic on export -n Do not export binary values Import options -k Ignore 'Constraint Violation' and 'Object Already Exists' errors. Note to successfully import a file it must contain as a minimum The DN(distinguished name), DisplayName and ObjectClass Username/Password credentials -a Sets the command to run using the supplied user distinguished name and password. For example: "cn=yourname,dc=yourcompany,dc-com password" -b Sets the command to run as username domain password. The default is to run using the credentials of the currently logged on user.

CSV (comma-separated value) format files can be read with MS Excel and are easily modified with a batch script.
LDIF files (Ldap Data Interchange Format) are a cross-platform standard. This provides a method to populate Active Directory with data from other directory services. (e.g. Netscape NDS, Novell NDS/eDirectory, Oracle Internet Directory)

Passwords
For security reasons neither of these tools will export passwords. When you import an account it is given a null password, if the domain has a password length policy, then the account will be disabled (You can re-enable accounts in bulk with a script)

Compatibility
CSVDE and LDIFDE are supplied with Windows 2000/2003 Server but can also be run on Win2000 Professional and XP Professional (i.e run remotely against the Active Directory Server.)

Examples

Export the whole domain
CSVDE -f MyDomain.csv

Export all users with a particular surname:
CSVDE -f MyUsers.csv -r (and(objectClass=User)(sn=Surname))

Import the whole domain
CSVDE -i -f MyDomain.csv -j C:\MyLogfile.txt


How helpful was this article to you?

Related Articles

article What are Active Directory Prerequisites for Exchange 2003?
Active Directory Prerequisites: For...

(No rating)  9-24-2008    Views: 84   
article How to Use the Directory Service Command-Line Tools to Manage Active Directory Objects in Windows Server 2003
This article describes how to use the Directory...

(No rating)  6-3-2008    Views: 211   
article How to recreate an Active Directory account and associate the original exchange mailbox with it
There are many instances when you will find it...

(No rating)  4-21-2008    Views: 116   

User Comments

Add Comment
No comments have been posted.