Using the LDIFDE utility

R

Russta

I am trying to export values out of an attribute from an
OU on my Test AD tree and then importing the value into
another OU on a Production AD tree. Does anyone know if
this can be done?
 
W

Wolfgang Kais

Hello Russta.
Russta" said:
I am trying to export values out of an attribute from an
OU on my Test AD tree and then importing the value into
another OU on a Production AD tree. Does anyone know if
this can be done?

Yes, but you will have to modify the file.
To export it:
ldifde -d "dc=test,dc=com" -r
"(&(objectClass=organizationalUnit)(ou=myOU))" -l "myAttribute" -f
myFile.txt

The file will look like this:
dn: ou=myOU,dc=test,dc=com
myAttribute: ValueOfTheAttribute

Make the file look like this (don't forget the "-" in the end):
dn: ou=anotherOU,dc=production,dc=com
changetype: modify
replace: myAttribute
myAttribute: ValueOfTheAttribute
-

(the modifications can be done within a batch file)
Then import it using:
ldifde -i -f myFile.txt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top