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

In part 1 we covered the deployments steps for Exchange 2013, in Part 2 of this series we covered Exchange 2013 configurations and testing, in part 3 started our migration process. In this final post we will walk through the final steps in migration, then remove our legacy server.

Important Update was released by the Exchange Team to enhance the discover of legacy public folders, the details and configurations for this update are well documented in this post, and must be followed before continue with the below steps.

8.Public Folder Migration

This phase is very well documented online, accordingly we will walk through the steps with minimum explanations, to understand the whole processes check this Link.

Before you begin Download all four of the Microsoft Exchange 2013 public folder migration scripts.

Preparation (take a snapshot from current Public Folders)

Open Exchange 2007 Management Shell and run the following commands:

Get-PublicFolder -Recurse | Export-CliXML C:PFMigrationLegacy_PFStructure.xml

Capture1

Get-PublicFolderStatistics | Export-CliXML C:PFMigrationLegacy_PFStatistics.xml

Capture2

Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML C:PFMigrationLegacy_PFPerms.xml

Capture3

Rename Folders with backslash

If the name of a public folder contains a backslash , the public folders will be created in the parent public folder when migration occurs. You have to rename any public folders that have a backslash in the name.

To get Public folders with backslash, run the following command:

Get-PublicFolderDatabase | ForEach {Get-PublicFolderStatistics -Server $_.Server | Where {$_.Name -like "**"}}

Capture4.1

Change the public folder name as shown below:

Set-PublicFolder -Identity 000000001A447390AA6611CD9BC800AA002FC45A0300D13A87259D34A142BB480F3E89AA82BF00004FD5389E0000 -name "MCS TF2"

Capture5

Make sure there is no previous record of a successful migration

Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete

Capture6

Generate the CSV files

On Exchange 2007 run the below script to create the folder name-to-folder size mapping file, the file will create the folders and its sizes

.Export-PublicFolderStatistics.ps1 PFStat.csv e12-01

Capture7

image

Copy this file to Exchange 2013 and run the below script to create the second CSV, which will let you know how many mailboxes will be required for your folders based on the mailbox you will set as show below:

.PublicFolderToMailboxMapGenerator.ps1 1GB PFStat.csv FolderToMailbox.csv

Capture8

As I have a very small PF only one Mailbox is required as below:

image

Create the required mailbox/s as shown below:

New-Mailbox -PublicFolder Mailbox1 –Database DB01 –HoldForMigration: $true

Capture10

Start the Migration Request

New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase -Server e12-01.contoso.local) -CSVData (Get-Content FolderToMailbox.csv -Encoding Byte)

Capture11

Check the status

Once the migration reached the AutoSuspended state as shown below, proceed to the next steps, otherwise you must wait as this may take some time based on your PF size.

Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics

Capture12

Lock Down PF for Migration (Down time is required, as during this phase PF will bot be accessible for all users)

Set-OrganizationConfig -PublicFoldersLockedForMigration:$true

Capture13.1

Set-PublicFolderMigrationRequest -Identity PublicFolderMigration -PreventCompletion:$false
Capture14

Resume-PublicFolderMigrationRequest -Identity PublicFolderMigration

Capture15

Test and Unlock the PF Migration

I will configure a test user to use the new PF using the following command:

Set-Mailbox -Identity mohsaeed -DefaultPublicFolderMailbox mailbox1

Capture16

Open the test user mailbox and run some tests: Create new post, view old posts, check permissions

If all tests passed successful proceed to next step.

Get-Mailbox -PublicFolder | Set-Mailbox -PublicFolder -IsExcludedFromServingHierarchy $false
Capture17

Set-OrganizationConfig -PublicFolderMigrationComplete:$true

Capture18

 

Decommissioning Exchange 2007

Remove Mailbox Databases, open Exchange 2007 management shell, and run the following command:

Get-MailboxDatabase | Remove-MailboxDatabase

Capture

Remove your PF Databse using guidelines in this link.

Open cmd, navigate to bin directory and run the below command:

Setup.com /mode:uninstall

Capture4

Regards,

Mohammad

One thought on “Part 4: Step-by-Step Exchange 2007 to 2013 Migration