How to export/import domain account information

  1. Export from DomainA:

csvde -f C:\Rename\export_AD.csv -m -n -o “primaryGroupID,lockoutTime” -j C:\Rename\Logs

Where:

-f filename to export to

-m do not export SAM values, e.g. objectSID

-n do not export binary values

-o exclude named columns

-j folder to log to (produces csv.log, plus csv.err if any errors occured)

2. Edit the export_AD.csv file as follows:

Delete the lines beginning:

o   “CN=Builtin …       (1 expected)

o   “CN=Infrastructure… (1 expected)

Delete all lines containing:

o   ,samServer,     (1 expected)

o   ,rIDSet,           (1 expected)

o   ,secret,           (4 expected)

o   ,rIDManager,       (1 expected)

Remove any ‘box’ (ASCII 13) characters in the text:

o   Unfortunately these cannot be searched for in Notepad

o   There may be one in the commas at the end of each of the last 50 lines in the file

Replace all instances of ‘PCOld’ with ‘PCNew’

o   Where PCOld is part of the machine name and domainname

3. Import into DomainB:

csvde -i -f C:\Rename\export_AD.csv -k -j C:\Rename\Logs

o   -i import

o   -f filename to export to

o   -k ignore non-serious errors (e.g. object, attribute or value already exists)

o   -j folder to log to (produces csv.log, plus csv.err if any errors occured)

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com

Leave a Reply