How to Import Directory Information into Active Directory Using Ldifde.exe

 

This topic discusses how to import directory information into Active Directory using Ldifde.exe.

Before You Begin

To successfully complete the procedure in this topic, ensure that your environment meets the following requirements:

  • You have Exchange Administrator permissions.

  • You have permissions to read and create organizational units and user accounts in Active Directory.

  • The non-Exchange messaging system supports LDAP, and you have the required permissions to access the non-Exchange directory information.

Procedure

To import directory information into Active Directory using Ldifde.exe

  1. Start Active Directory Users and Computers, right-click the domain object, such as Fabrikam.com, and then point to New and select Organizational Unit.

  2. In the New Object – Organizational Unit dialog box, type Remote SMTP Recipients in the Name text box, and then click OK.

    A dedicated organizational unit for SMTP recipients

    36b5a676-484f-4187-892d-dd9c075ce06b

  3. Start Windows Explorer and open the directory where the Exchange Migration Wizard placed the migration files (for example, D:\ADSI.001).

  4. Open the directory.pri file in Notepad and verify that it contains valid data.

    A sample directory.pri file

    c7abfc6a-bdd9-49f5-a6c9-30db99abc4fe

  5. Use the information from the directory.pri file to create a local data file (LDF) file for Ldifde.exe. The following is a sample LDF file:

    dn: CN=Ted Bremer,OU=Remote SMTP Recipients,DC=fabrikam,DC=com
    changetype: add
    objectClass: contact
    cn: Ted Bremer
    sn: Bremer
    givenName: Ted
    displayName: Ted Bremer
    mailNickname: Ted
    targetAddress: SMTP: Ted@legacy.fabrikam.com
    mail: Ted@legacy.fabrikam.com
    
    dn: CN=Hao Chen,OU=Remote SMTP Recipients,DC=fabrikam,DC=com
    changetype: add
    objectClass: contact
    cn: Hao Chen
    sn: Chen
    givenName: Hao
    displayName: Hao Chen
    mailNickname: Hao
    targetAddress: SMTP: Hao@legacy.fabrikam.com
    mail: Hao@legacy.fabrikam.com
    
    dn: CN=Pilar Ackerman,OU=Remote SMTP Recipients,DC=fabrikam,DC=com
    changetype: add
    objectClass: contact
    cn: Pilar Ackerman
    sn: Ackerman
    givenName: Pilar
    displayName: Pilar Ackerman
    mailNickname: Pilar
    targetAddress: SMTP: Pilar@legacy.fabrikam.com
    mail: Pilar@legacy.fabrikam.com
    

    Tip

    You can automate the conversion of .csv-based files, such as directory.pri, into LDF format by using a Microsoft Excel macro, as discussed in Understanding Interoperability and Migration in Exchange Server 2003.

  6. Save the file in the current directory as Importfile.ldf and then use the following command to import the data into Active Directory:ldifde -i -f c:\importfile.ldf -s Server01.

  7. Switch back to Active Directory Users and Computers, refresh the view, and verify that the recipient objects exist.

    Mail-enabled user accounts for non-Exchange users

    95c289e3-49dd-4988-97e0-b88a2c412d45

Note

For full directory synchronization, you must also export directory information about Exchange users from Active Directory and import this data into the legacy messaging system. You must perform this step manually or in a semi-automated way using tools that are included with your legacy messaging system. Administering or programming a non-Exchange messaging system is beyond the scope of this topic.

For More Information

For conceptual information about interoperating with and migrating from other non-Exchange messaging systems to Exchange Server 2003, see Interoperating with and Migrating from Other Non-Exchange Messaging Systems to Exchange Server 2003.