Connecting to a target Exchange server

Once you installed CodeTwo Exchange Migration and configured a source environment, it is time to create a connection to your target Exchange server.


The program uses Exchange Web Services (EWS) to connect to a target Microsoft Exchange Server environment.

To configure a target connection, you need to launch the Target server connection wizard. There are two ways to do that:

  • click the Settings (Exchange Migration settings button temp) button on the Defined target server connections card, and then click New (Fig. 1.); or
  • click Create a new migration job on the How to start card, go to the Target mailboxes step, and then Choose Add new target connection from the Target server drop-down list.

Creating a new target server connection.
Fig. 1. Creating a new target server connection.

Either way, the Target server connection wizard will open. In the first step, Server connection, you need to choose whether to let the program automatically detect a target Exchange server (Fig. 2.) or to define it manually, by using its FQDN or IP address. If you want to connect to the target server from the same domain, the Autodiscover Exchange Server function will locate it automatically.

Opening the target server configuration window.
Fig. 2. Opening the target server configuration window.

On the other hand, if you want to set up a target server from a different domain, the Autodiscover function will not work. You need to enter the server's location manually. To do that, select Configure connection manually (Fig. 3.) and enter the server's Fully Qualified Domain Name (FQDN) or IP address. You do not need to fill in the EWS URL field – it will be filled in automatically with the selected server's data.


We recommend using the FQDN of your target server when you configure the connection manually. If you want to use the IP address, you have to configure PowerShell Virtual Directory in IIS for basic authentication, as described in this article. Otherwise, the program will not be able to assign impersonation rights and to automatically create mailboxes.

Using FQDN to establish a target server connection.
Fig. 3. Using FQDN to establish a target server connection.

In the next step, Admin account, you need to provide a valid UPN and password of an account that will access the target Exchange server (Fig. 4.). This account needs to be assigned specific management roles, as shown in the wizard, in order to be able to access user’s mailboxes or create new users and mailboxes. The program will check for and, if necessary, assign these roles automatically in the next step. Make also sure that the Target domain field is filled in properly.

Providing admin's credentials.
Fig. 4. Providing admin's credentials.


Make sure that the UPN of the provided admin account is configured. Otherwise, the program may not work correctly and errors are likely to appear.

Move on to the next step, Configuration, and click Configure. The wizard will set up the connection to your target Exchange server. In case the account provided in the previous step lacks some of the necessary roles, the program will attempt to assign them automatically (Fig. 5.). Click Yes to accept.

Exchange Migration target connection wizard 3
Fig. 5. Assigning the missing management roles.

You might be prompted to provide the credentials of another admin account that belongs to the Organization Management role group (Fig. 6.). This account will not be used to connect to the target server, but only to assign the missing roles. Learn more about the management roles.

Exmigr troubleshooting View-Only Conf admin cred
Fig. 6. Providing credentials of an account that has appropriate roles assigned.


Some of these roles are optional if certain conditions are met. For example, the Public Folders role is only necessary if you plan to migrate public folders, while the Mail Recipient Creation and Mail Recipients roles are needed to create new mailboxes on the target server by the program. Clear the appropriate checkboxes (Fig. 7.) if you don't want to assign any of these optional roles to the used admin account.

Assigning optional management roles.
Fig. 7. Assigning optional management roles.

When your configuration is successfully completed (as shown in Fig. 8.), click Finish to save it and exit the wizard.

Exchange Migration target connection wizard 3
Fig. 8. Successful connection to the target server.

Your new connection will appear in the Defined target server connections card (Fig. 9.) on the program's Dashboard.

Defined target server connections.
Fig. 9. Defined target server connections.


You cannot use the same UPN to configure multiple connections to the same target server. To configure another connection to the same Exchange server, use the UPN of a different administrator.

See next

Configuring a migration job

Managing server connections

In this article

Was this information useful?