Exportar (0) Imprimir
Expandir todo

Cómo reubicar cuentas de buzón de Exchange


Última modificación del tema: 2005-10-11

This topic provides an example of how you might use the Lightweight Directory Access Protocol Data Interchange Format directory export tool (LDIFDE) to re-home all mailbox accounts on one server to a different server.

For more information about LDIFDE, see the topic Uso de LDIFDE para manipular atributos de buzón.

The following table provides values related to the example. All of these values are in a single unbroken line, although they may appear wrapped on your display.

Values of attributes used in example of re-homing mailbox values

Attribute Value

Active Directory® directory service domain name where all user accounts are located

Source database


Source storage group


Source server


Microsoft® Exchange organization


Destination database


Destination storage group


Destination server


LDAP name of the domain


Source server msExchHomeServerName


Source server homeMTA

CN=Microsoft MTA,CN=Exchange1,CN=Servers,CN=AG1,CN=Administrative Groups,CN=Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com

Source database homeMDB

CN=DB1,CN=SG1,CN=InformationStore,CN=Exchange1,CN=Servers,CN=AG1,CN=Administrative Groups,CN=Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com

This example assumes that you are generally familiar with Active Directory object naming and hierarchical organization and with general LDAP object and attribute naming conventions.


To re-home mailbox accounts from Exchange1 to Exchange2
  1. Export the user accounts with this LDIFDE command:
    LDIFDE –F [output file] –D [domain and/or container name] –L [attributes to export] –R [LDAP query filter for the database]
    For example:
    LDIFDE –F EXPORT-EXCHANGE1.TXT –D “DC=contoso,DC=com” –L msExchHomeServerName,homeMDB,homeMTA –R “(homeMDB=CN=DB1,CN=SG1,CN=InformationStore,CN=Exchange1,CN=Servers,CN=AG1,CN=Administrative Groups,CN=Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com)”
    This command exports all the user accounts linked to mailboxes in DB1, with each export record appearing similar to this one:
    In the examples below, several lines are formatted with an attribute name on one line followed by value names that are indented a single space and split into multiple lines. This is the LDIF convention for continuing an attribute value across a line break.
    dn: CN=User1,CN=Users,DC=contoso,DC=com
    changetype: add
    CN=Microsoft MTA,CN=Exchange1,CN=Servers,CN=AG1,CN=Administr
     ative Groups,CN=Organization,CN=Microsoft Exchange,CN=Services,CN
     N=AG1,CN=Administrative Groups,CN=Organization,CN=Microsoft Ex
  2. Reformat each record in the export file so that it can be used to modify each user account. The general format of such an import file is:
    dn: <value>
    changetype: modify
    replace: <attribute name>
    <attribute name>: <value>
    Replace: <attribute name>
    <attribute name>: <value>

    #<blank line>
    #<next record>

    For example:
    dn: CN=User1,CN=Users,DC=contoso,DC=com
    changetype: modify
    replace: homeMTA
     CN=Microsoft MTA,CN=Exchange1,CN=Servers,CN=AG1,CN=Administr
     ative Groups,CN=Organization,CN=Microsoft Exchange,CN=Services,CN
    replace: homeMDB
     AG1,CN=Administrative Groups,CN=Organization,CN=Microsoft Exchange
    replace: msExchHomeServerName
    Dn: CN=User2,CN=Users,DC=contoso,DC=com
    changetype: modify
    <and so on……>
    If you have a text editor that can perform a search and replace across line breaks, it is relatively easy to transform the export file into the appropriate import format. For example, you can do this in Microsoft Office® Word, where ^p is the Word search, and replace code for a line break:


    Search for Replace with



    changetype: add

    changetype: modify


    replace: homeMTA^phomeMTA


    -^preplace: homeMDB^phomeMDB


    -^preplace: msExchHomeServerName

    [name of original database]

    [name of new database]

    [name of original storage group]

    [name of new storage group]

    [name of original server]

    [name of new server]

    After you have finished the replacements, remove the blank line and “-‘ from the top of the file before the first record, and add a “-“ and a blank line to the end of the last record.
    If you are using Microsoft Word or another rich text editor, be sure to save the file as plain text. You should save the file under a new name, such as EXCHANGE2-IMPORT.TXT, so that the original export file is preserved if additional editing is required.
  3. Import the file with this command:
    LDIFDE –I – F <import file>
    For example:
    Do not re-home mailboxes for SMTP connectors, the System Attendant, or the System Mailbox. Remove the LDIF records for these mailbox types in your import file before you import again. Search for “SMTP”, “SystemMailbox”, and “System Attendant” to locate these mailboxes.

For more information about other methods you can use to enable, disable, and re-home mailboxes, see Uso de atributos de Active Directory para habilitar, deshabilitar y reubicar buzones.

© 2016 Microsoft