Part 2: Step-by-Step Exchange 2007 to 2013 Migration

In Part 1 of this post we went through the steps required to deploy Exchange 2013, in this part we will start by the required configurations on Exchange 2013 to establish our coexistence and then test it.

2.Digital Certificates Configurations

SSL Certificate

The first step in our configurations will be certificate. By default Exchange is installed with self-signed certificate, we need to replace this certificate to include the correct names (legacy is required as I will use the same certificate on Exchange 2007 and TMG as well):



FQDN used by all external and internal clients

FQDN for the autodiscover service

FQDN used by all external and internal clients for Exchange 2007

To create certificate request open exchange management shell and run the following command:

New-ExchangeCertificate -FriendlyName 'Contoso Exchange 15 Certificate' -GenerateRequest -PrivateKeyExportable $true -KeySize '2048' -SubjectName 'C=EG,S="Cairo",L="Cairo",O="Contoso",OU="IT",' -DomainName '','' ,'' | out-file c:swe15_csr.txt


Submit your certificate request to be signed by your CA, then use the following command to import the certificate:

Import-ExchangeCertificate -filename c:swcertnew.cer


Configure the Exchange server to use this certificate using the following command:

Enable-ExchangeCertificate -Thumbprint A826389C71ED5870137B866F01192D47F69CE526 -Services IIS,POP,IMAP


Export the certificate with the private key and import it on Exchange 2007 CAS servers using the same steps.

To use the Exchange certificate wizards, follow this link.

3.Exchange 2013 name space & virtual directories configurations

To configure Exchange 2013 virtual directories open Exchange 2013 management shell and follow the below steps:

OWA and ECP:

Set-OwaVirtualDirectory -Identity "e15-01OWA (Default Web Site)" -ExternalUrl -LogonFormat username -DefaultDomain contoso.local


Set-EcpVirtualDirectory -Identity "e15-01ECP (Default Web Site)" -ExternalUrl



Set-OabVirtualDirectory -Identity "e15-01OAB (Default Web Site)" -InternalUrl -ExternalUrl



Set-ActiveSyncVirtualDirectory –Identity “e15-01Microsoft-Server-ActiveSync (Default Web Site)” –ExternalUrl –InternalUrl


Web Services:

Set-WebServicesVirtualDirectory –Identity “e15-01EWS (Default Web Site)” -InternalUrl –ExternalUrl



Set-ClientAccessServer -Identity e15-01 -AutoDiscoverServiceInternalUri


Outlook Anywhere:

Set-OutlookAnywhere -Identity "E15-01Rpc (Default Web Site)" -InternalHostname -ExternalHostname -InternalClientAuthenticationMethod Ntlm -ExternalClientAuthenticationMethod Basic -ExternalClientsRequireSsl $True -InternalClientsRequireSsl $true


4.Configure offline address book (OAB)

Change the default OAB on Exchange 2013 databases, to do so open Exchange 2013 Management Shell and run the following command:

Get-MailboxDatabase | Set-MailboxDatabase -OfflineAddressBook "Default Offline Address Book (Ex2013)"


5.Exchange 2013 Mail flow configurations:

Receive connectors

In my case all I need is one connector to receive mails from TMG (or SMTP GW), to create this connector use the below command:

New-ReceiveConnector -Name Inbound -Usage Custom -Bindings -RemoteIPRanges


Send connector:

All you have to do is to add Exchange 2013 server to the existing send connector as shown below:

Set-SendConnector -Identity Outbound -SourceTransportServers E12-01,E15-01


Transport Rules:

Transport rules are not migrated to exchange 2013; accordingly you must export and import them as below:

Open Exchange 2007 management shell and run the following command:

Export-TransportRuleCollection -FileName "c:ExportedRules.xml"


Copy the ExportedRules.xml file to Exchange 2013, open Exchange 2013 management shell & run the following command:

[Byte[]]$Data = Get-Content -Path "C:TransportRulesExportedRules.xml" -Encoding Byte -ReadCount 0
Import-TransportRuleCollection -FileData $Data


For additional readings check this Link


Now its time to create your own test scenarios and apply them before starting your migration.

For me I have a small test scenarios as below:

Create a test user on E15 and apply the following tests from a machine with hosts file that point to Exchange 2013 server.

Test mail flow by sending couple of mails to Exchange 2007 users, outbound and Inbound mail flow and analyze headers using the same tool.

You can add your 3rd party tools configurations and testing, and once you complete all tests successfully, continue to Part 3 and let us start the migration process.