Sunday, July 4, 2010

Export/Import Mail-Enabled Contacts with LDIFDE

ADMT doesn’t support migration of contacts, so an alternative is to use ldifde to export and import contacts.

These are the main attributes needed to make the imported contact a mail-enabled one (At least for Exchange 2003)
cn,objectclass,samAccountName,legacyExchangeDN,mail,mailNickname,
proxyAddresses,displayName,targetAddress

And these are some general atributes that you may need to copy:
givenName,sn,name,physicalDeliveryOfficeName,description

Command line to export contacts:

ldifde -f Contacts.ldf -s dc01 -d "ou=Contacts,dc=domain,dc=com"
-p subtree -r "(&(objectCategory=person)(objectClass=Contact)(givenname=*))"
-l "cn,givenName,objectclass,samAccountName,mail,legacyExchangeDN,
mailNickname,proxyAddresses,physicalDeliveryOfficeName,displayName,
name,description,sn,targetAddress"

Probably you are importing those contacts to a different domain/forest, so you need to replace the domain name (“dc=domain,dc=com”) with the new one on the ldf file.

Command line to import contacts:

ldifde -i -f contacts.ldf

No comments:

Post a Comment