Windows Commands: Import or Export Active Directory data to a file


LDIFDE-Windows Command

CSVDE / LDIFDE (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 )

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

Other Windows 98, Windows XP Commands:
addusers , arp , assoc , associate , at , attrib , browstat , cacls , call , cd , change , chkdsk , chkntfs , choice , cipher , cleanmgr , clip , cmd , color , comp , con2prt , copy , date , defrag , del , delprof , dir , diruse , diskcomp , diskcopy , doskey , dsadd , dsmod , echo , endlocal , exit , expand , expand , fc , fdisk , find , findstr , for , forfiles , format , fsutil , ftp , ftype , global , goto , help , hfnetchk , if , ifmember , ipconfig , kill , label , ldifde , local , logevent , logoff , logtime , mapisend , md , mem , mode , monitor , more , mountvol , move , moveuser , msg , msiexec , msinfo32 , mstsc , munge , mv , nbtstat , net , netdom , netsh , netstat , netsvc , now , nslookup , ntbackup , ntrights , path , pathping , pause , perms , ping , popd , portqry , print , prncnfg , prnmngr , prompt , pushd , qgrep , rasdial , rasphone , rd , rdisk , recover , reg , regedit , regsvr32 , rem , ren , replace , rmtshare , robocopy , route , runas , rundll32 , sc , schtasks , sclist , scriptit , set , setlocal , setx , share , shift , shortcut , showgrps , showmbrs , shutdown , sleep , soon , sort , start , su , subinacl , subst , tasklist , time , timeout , title , touch , tracert , type , ver , verify , vol , where , whoami , windiff , winmsd , winmsdp , wmic , xcacls , xcopy ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources