I just spent entirely too much time searching for a resolution to an issue that, although quite simple to resolve, didn’t seem to be that obvious to me.
When using the command csvde.exe to import data into Active Directory (i.e creating 1600 new user accounts in an environment with thousands of existing accounts) it might be a good idea to log any errors reported during the process Which, I’ve found, is easier said then done.
The command usage states there is a switch for logging:
CSV Directory Exchange
-i Turn on Import Mode (The default is Export)
-f filename Input or Output filename
-s servername The server to bind to (Default to DC of computer’s domain)
-v Turn on Verbose Mode
-c FromDN To DN Replace occurrences of FromDN to Town
-j path Log File Location
-t port Port Number (default = 389)
-u Use Unicode format
But this switch works in an odd way, the usage must be the PATH only, not including the actual filename, which seems counterintuitive to me.
csvde -i -f importfile.csv -j c:project
Anything other than a 100% correct entry and you’ll be routinely rewarded with "unable to open log file" which isn’t very helpful.
examples of incorrect usage are:
csvde -i -f importfile.csv -j c:projecterror.txt
csvde -i -f importfile.csv -j error.txt
When the command is run correctly, 2 new files will be created at the specificed path: csv.err and csv.log.