I created a test domain and copied the OU structure and user accounts to it from my existing domain using ldifde as described in the KB below. Unfortunately, this did not copy the groups, or the group membership.
I am trying to use the following command to export groups with membership.
ldifde -f export_Groups_WITH_Members.ldf -s -d "" -p subtree -r "(&(ObjectCategory=group)(objectClass=group)(name=)(member=))" -l "member" -j c:\
This seems to work as I get an ldf file with what looks like all of the group and membership information, however, after I replace the old domain dn with the new domain dn and try to import it, I get the following error:
ldifde -i -k -f export_Groups_WITH_Members.ldf -s prodef-dc-01 -v
Importing directory from file "export_Groups_WITH_Members.ldf" Loading entries 1: CN=XXX,OU=XXX,OU=XXX,OU=XXX,DC=XXX,DC=CATS,DC=XXX,DC=XX
Add error on entry starting on line 1: Object Class Violation The server side error is: 0x207b The object class attribute must be specified. The extended server error is: 0000207B: UpdErr: DSID-030511CF, problem 6002 (OBJ_CLASS_VIOLATION), data 0