Exchange 2007 to Exchange 2013 Migration Step by Step Guide

In this blog, we will discuss how to migrate from Exchange server 2007 to Exchange server 2013 and after migration how to uninstall/decommission the Exchange server 2007.

The general steps to migrate from Exchange server 2007 to 2013 are:

  • Deploying Exchange server 2013 as new environment
  • Configuring Digital Certificates for the new Exchange server
  • Configuring Name Space and Virtual Directories
  • Offline Address Book (OAB) configuration
  • Mail Flow Configurations
  • Moving Client Access to Exchange server 2013
  • Moving Mailboxes to Exchange server 2013
  • Moving Public Folders to Exchange server 2013 and
  • Decommission Exchange Server 2007

1. Deploying Exchange server 2013 as new environment

Active Directory Preparation

When we install Exchange Server we have to store User mailboxes and Exchange Server configuration information in the organization. So it’s important that Active Directory is duly prepared before you install Exchange 2013 in the organization. Before you deploy Exchange Server 2013 in the environment, below mention following things need to be done:

  • Extend Active Directory Schema
  • Prepare Active Directory
  • Prepare Active Directory Domains

To ensure that AD preparation is done correctly, verify that the Range-Upper property on ms-Exch-Schema-Version-Pt is set to the correct value.

After this force AD replication.

Exchange Server 2013 Installation

Before installing 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

One the installation is completed restart your server. After 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

As we know the by default, Exchange server comes with self-signed certificates; and we have to replace this certificates with the ones most relevant to our. 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.


After this we have to create certificate request, to do this open EMS and run the New-ExchangeCertificate cmdlet command.

When the certificate is created, make sure it is signed by the appropriate certification authority (CA) and then use the Import-ExchangeCertificate to import the certificate.

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

Keep in mind 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.

You can use the 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 below 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.

You need to change the default OAB on Exchange server 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:

Simply we cannot migrate Transport rules from Exchange Server 2007 to 2013. So you need to follow the below steps 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 server 2013

To move Client access to Exchange server 2013, In the Exchange server 2007 management shell you need to run the below 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 server 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 server 2013. And in new record points to Exchange server 2007. In the Public DNS, point and to TMG listener and for point new record to TMG Listener.


7. Moving Mailboxes to Exchange server 2013

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 to migrate mailbox to exchange 2013 if you want.


8. Moving Public Folders to Exchange server 2013

To start with, take snapshot of the current Public Folders in Exchange Server 2007 EMS using the following commands: Get-PublicFolderGet-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 server 2013, create PF mailboxes using New-Mailbox –PublicFolder cmdlet. Migrate Public Folders content using New-PublicFolderMigrationRequest cmdlet.

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

In Exchange 2007Set-OrganizationConfig –PublicFoldersLockedForMigration $True

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

In Exchange 2013Resume-PublicFolderMigrationRequest <name> 

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

Set-OrganizationConfig -PublicFolderMigrationComplete:$true


9. Decommission 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

By following above steps you can complete the entire Exchange Server 2007 to 2013 migration and after migration decommission exchange server.