Step-by-Step Guide to Migrate from Exchange Server 2007 to Exchange Server 2013

Before planning your Exchange Server 2013 migration ensure you are familiar with all its features like virtualization, retention, modern public folders, managed availability, transport, unified messaging, EWS, Outlook Web App etc.

As Exchange is critical to the communication network, it is important to do a smooth Exchange migration which causes minimum or zero interruption to the organizational communication. In this blog, we will see how to migrate all users and services from Exchange 2007 to Exchange 2013 and finally decommission the old Exchange 2007.

The high-level steps that we will take to devise the migration are:

  1. Deploying Exchange 2013 as new environment

  2. Configuring Digital Certificates for the new Exchange

  3. Configuring Name Space and Virtual Directories

  4. Offline Address Book (OAB) configuration

  5. Mail Flow Configurations

  6. Moving Client Access to Exchange 2013

  7. Moving Mailboxes to Exchange 2013

  8. Moving Public Folders to Exchange 2013 and decommissioning old Exchange Server

1. Deploying Exchange 2013 as new environment

Active Directory Preparation

When we install Exchange Server it needs to store User mailboxes’ and Exchange Server’s configuration information in the organization. So it is important that Active Directory is duly prepared before you install Exchange 2013 in the organization. Following things need to be done before you deploy Exchange Server 2013 in the environment: a> Extend Active Directory Schema b> Prepare Active Directory and 3> Prepare Active Directory Domains. To ensure that AD preparation is done correctly, verify that the rangeUpper property on ms-Exch-Schema-Version-Pt is set to the correct value. After this force AD replication.

Exchange Server 2013 Installation

When you are ready for running Exchange Server setup ensure that server is fully updated with latest patches. To install Windows Features using PowerShell Run Windows PowerShell as Administrator and paste the following command:

Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation

After the installation is complete restart your server. And after the reboot, download and install Microsoft Unified Communications Managed API 4.0. Core Runtime 64-bit, Microsoft Office 2010 Filter Packs 64 bit, Microsoft Office 2010 Filter Packs SP1 64 bit.

2. Configuring Digital Certificates

You should be using as few certificates and host names as possible for cost control since certificate providers charge a fee based on number of host names you add to your certificate. By default, Exchange comes with self-signed certificates, we will replace this certificates with the ones relevant to our case.

  • FQDN for most connections to Exchange including Microsoft Outlook, Outlook Web App, Outlook Anywhere, the Offline Address Book, Exchange Web Services, POP3, IMAP4, SMTP, Exchange Control Panel, and ActiveSync.

  • FQDN used by clients that support Auto discover, including Microsoft Office Outlook 2007 and later versions, Exchange ActiveSync and Exchange Web Services clients.

  • FQDN used by all external and internal clients for old server i.e. Exchange Server 2007.

Next we will create certificate request, for this open EMS and run the New-ExchangeCertificate cmdlet command:

Once the certificate is created, get it signed by the appropriate certification authority (CA) and use the Import-ExchangeCertificate to import the certificate.

Then Exchange Server 2013 need to be configured to use the certificates using the Enable-ExchangeCertificate command.

Please note that Enable-ExchangeCertificate cmdlet cannot be used to enable a wildcard certificate for POP and IMAP services, also it cannot be used to enable a certificate for federation.

Use private key to export the certificate and import it on Exchange 2007 CAS servers using the same steps.

3. Configuring Name Space and Virtual Directories for Exchange Server

Follow the given steps to configure Exchange Server 2013 virtual directories using EMS:

Exchange Control Panel

To configure Exchange Control Panel (ECP) virtual directories properties, use Set-EcpVirtualDirectory cmdlet.

Outlook Web App

To configure Outlook Web App virtual directories use Set-OwaVirtualDirectory cmdlet.

Offline Address Book

To configure offline address book virtual directory use Set-OABVirtualDirectory cmdlet.


Use Set-ActiveSyncVirtualDirectory cmdlet to configure the Microsoft Exchange ActiveSync settings on specified virtual directory.

Web Services

To modify Exchange Web Services virtual directory use Set-WebServicesVirtualDirectory cmdlet on the server running Exchange Server 2013.


To set properties on specified Client Access Server objects use Set-ClientAccessServer cmdlet.

Outlook Anywhere

To set properties on a computer running Microsoft Exchange Server 2013 enabled for Microsoft Outlook Anywhere use Set-OutlookAnywhere cmdlet.

4. Offline Address Book (OAB) configuration

In Exchange Server 2013, OABGen (Offline Address Book Generation) service which runs on Mailbox server generates offline address book.

Change the default OAB on Exchange 2013 database using Get-MailboxDatabase and Set-MailboxDatabase

5. Mail Flow Configurations on Exchange 2013

Receive Connector

To create this connector use the New-ReceiveConnector cmdlet.

Send Connector

Now add the new Exchange Server to the existing send connector by the Set-SendConnector cmdlet.

Transport Rules:

Transport rules cannot be migrated from Exchange Server 2007 to 2013. So you need to do the following to get Transport rules in Exchange Server 2013.

  1. Use Export-TransportRuleCollection cmdlet to export all transport rules from Exchange Server 2007.
  2. Copy the exported Transport Rule file to the system which has Exchange Server 2013 installed on it.
  3. Use Import-TransportRuleCollection cmdlet to import the Transport Rules from the file to the Exchange Server 2013.

6. Moving Client Access to Exchange 2013

In the Exchange 2007 management shell you need to run the following commands.

Outlook Web App

Use Set-OwaVirtualDirectory cmdlet to modify properties of MS Outlook Web App virtual directories.

Offline Address Book

Use Set-OABVirtualDirectory cmdlet to configure offline address book virtual directory.


Use Set-ActiveSyncVirtualDirectory cmdlet to configure the Microsoft Exchange ActiveSync settings on specified virtual directory.

Web Services

To modify Exchange Web Services virtual directory use Set-WebServicesVirtual Directory cmdlet on the server running Exchange Server 2007.

Unified Messaging

To modify an existing Exchange Unified Messaging virtual directory, run the Set-UMVirtualDirectory cmdlet.

Outlook Anywhere

To set Microsoft Outlook Anywhere properties on Microsoft Exchange Server 2007 use Set-OutlookAnywhere cmdlet.

Threat Management Gateway Rules

Now create and update your TMG publish rules.

Next update your publish rules for Exchange 2007 to accept connections for Legacy name space. And then publish Exchange Server 2013 using TMG.

Domain Name System Configurations:

In the Internal DNS, point and to Exchange 2013 server. And in new record points to Exchange 2007 Server. In the Public DNS, point and to TMG listener and for point new record to TMG Listener.

7. Moving Mailboxes to Exchange 2013

Next you can use New-MoveRequest cmdlet to start mailbox or personal archive migration. To check mailbox readiness before starting to move mailboxes you can use WhatIf parameter. You can also create batch move if you want.

8. Moving Public Folders to Exchange 2013 and decommissioning old Exchange

To start with, take snapshot of the current Public Folders in Exchange Server 2007 EMS using the following commands: Get-PublicFolder, Get-PublicFolderStatistics and Get-PublicFolderClientPermission.

Next create CSV files using scripts (Export-PublicFolderStatistics.ps1 and PublicFolderToMailboxMapGenerator.ps1). In this way you will get the CSV file mapping PFs to new PF mailboxes.

In the Exchange 2013, create PF mailboxes using New-Mailbox –PublicFolder cmdlet. Migrate PF content using New-PublicFolderMigrationRequest cmdlet.

Before starting the final migration, lock down Exchange Server 2007 using the following cmdlets.

Set-OrganizationConfig –PublicFoldersLockedForMigration $True (In Exchange 2007)

Set-PublicFolderMigrationRequest <name> -PreventCompletion $False (In Exchange 2013)

Resume-PublicFolderMigrationRequest <name> (In Exchange 2013)

Test new public folders to ensure everything is alright. Then us the following cmdlet to unlock the PF migration.

Set-OrganizationConfig -PublicFolderMigrationComplete:$true

Decommissioning Exchange Server 2007

Open Exchange Server 2007 management shell and run the following command to remove mailbox databases.

Get-MailboxDatabase | Remove-MailboxDatabase

Remove the public database and in the cmd run the following command to uninstall Exchange: /mode:uninstall

Thus we complete the entire Exchange Server 2007 to 2013 migration process.

The following two tabs change content below.
Ajit Singh

Ajit Singh

Manager – Marketing Operations at Lepide Software Pvt. Ltd
Ajit Singh is a Manager – Marketing Operations with Lepide Software Pvt. Ltd. He is a positive person in every aspect of life and he believes, sharing ones expertise not only helps others in their professional endeavors but it makes the world a better place.


  1. Greetings from Colorado! I’m bored to death at work so I decided to browse your website
    on my iphone during lunch break. I enjoy the knowledge you present here and can’t wait
    to take a look when I get home. I’m surprised at how quick your blog loaded on my
    cell phone .. I’m not even using WIFI, just 3G .. Anyhow, good site!

  2. Pingback: A quick overview of migrating from Exchange 2007 to Exchange 2016 - MS Technology Talk

Leave a Reply

Your email address will not be published. Required fields are marked *