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 a 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 a 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 the server is fully updated with the 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

Once 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 these certificates with the ones most relevant to us.

mail.contoso.com: 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.

autodiscover.contoso.com: FQDN used by clients that support Auto Discover, including Microsoft Office Outlook 2007 and later versions, Exchange ActiveSync, and Exchange Web Services clients.

legacy.contoso.com: FQDN used by all external and internal clients for the old server i.e., Exchange Server 2007.

 

After this, we have to create a certificate request. To do thi,s 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 needs 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 steps 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 the offline address book virtual directory, use Set-OABVirtualDirectory cmdlet.

ActiveSync

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

Web Services

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

AutoDiscover

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, the OABGen (Offline Address Book Generation) service, which runs onthe  Mailbox server, generates the offline address book.

You need to change the default OAB on the 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 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 that 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 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 the offline address book virtual directory.

ActiveSync

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

Web Services

To modify the Exchange Web Services virtual directory, use the 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 mail.contoso.com and autodiscover.contoso.com to the Exchange Server 2013. And in Legacy.contoso.com new record points to the Exchange server 2007. In the Public DNS, point mail.contoso.com and autodiscover.contoso.com to the TMG listener, and for Legacy.contoso.com, point a new record to the 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 a parameter. You can also create a batch to migrate the mailbox to Exchange 2013 if you want.

 

8. Moving Public Folders to Exchange Server 2013

To start with, take a 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 Exchange Server 2013, create PF mailboxes using New-Mailbox –PublicFolder the cmdlet. Migrate Public Folders content using New-PublicFolderMigrationRequest a 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 the 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:

Setup.com /mode:uninstall

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

Third-Party Exchange Migration Tools

Seamlessly migrates mailboxes across Exchange Servers and Microsoft 365, supports same and cross-domain without the need to run complex PowerShell scripts. 

Stellar Migrator for Exchange

SysTools Exchange Migration