34 C
Dubai
Wednesday, October 9, 2024

Migrating Public Folders from Exchange 2010 to Exchange 2013

Step 1 :

Downloading Required PF migration Scripts

Login to Exchange 2010 –

Download the PF migration Scripts

Step 2:

Backing up PF structure in Exchange 2010

Backing up PF Folder , Items and Permission structure and run a full backup on the PF database.

First Run these Commands to take a Backup of Public Folder structure.

Backing up PF Structure

Get-PublicFolder -Recurse | Export-CliXML C:\PFMigration\Legacy_PFStructure.xml

Backing up PF Folder item Structure

Get-PublicFolderStatistics | Export-CliXML C:\PFMigration\Legacy_PFStatistics.xml

Backing up PF Permission Structure

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

Step 3:

Removing Unsupported Sign from PF Name in Exchange 2010

Make sure there is no PF folder contains the sign “\” in the name.

Get-PublicFolderStatistics -ResultSize Unlimited | Where {$_.Name -like “*\*”} | Format-List Name, Identity

if it returns any folder , Remove the “\” from the Public Folder name.

NOTE : If the name of a public folder contains a backslash \, the public folders will be created in the parent public folder. Review the .csv file and edit any names that contain the backslash.

Step 4:

Removing any existing Migration Request or any PF Folder in Exchange 2013

Make sure there is no Public folder migration request exist already.

Get-PublicFolderMigrationRequest

If there is any

Remove them

Get-PublicFolderMigrationRequest | Remove-PublicFolderMigrationRequest -Confirm:$false

Make Sure there is no PF mailbox or folder created in Exchange 2013

Get-Mailbox –PublicFolder

Get-PublicFolder

To Remove PF mailbox and PF folder in Exchange 2013

Get-Mailbox -PublicFolder | Where{$_.IsRootPublicFolderMailbox -eq $false} | Remove-Mailbox -PublicFolder -Force -Confirm:$false

Get-Mailbox -PublicFolder | Remove-Mailbox -PublicFolder -Force -Confirm:$false

Step 5:

Making Sure Public Folders is not Locked in Exchange 2010

Make sure PublicFoldersLockedforMigration, PublicFolderMigrationComplete  is set to $false

Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete

image

Step 6:

Create the Foldertosize map file in Exchange 2010

Run the Script –

.\Export-PublicFolderStatistics.ps1 Foldertosize.csv mailboxserver.testcareexchange.biz

For Example –

.\Export-PublicFolderStatistics.ps1 Foldertosize.csv exch2010.testcareexchange.biz

image

Step 7:

Create the public-folder-to-mailbox map file in Exchange 2010

Run the Script –

.\PublicFolderToMailboxMapGenerator.ps1 <Maximum mailbox size in bytes> <Folder to size map path> <Folder to mailbox map path>

For Example – Taking 25 Gb into bytes

.\PublicFolderToMailboxMapGenerator.ps1 26843545600 Foldertosize.csv public-folder-to-mailbox.csv

image

Step 8:

Determining the number of PF mailboxes required . And Creating it

Now open the public-folder-to-mailbox.csv file , It will show you how many mailboxes you need.

image

Use the Below Script for 25 mailboxes . my case its only 1

$numberOfMailboxes = 25;

for($index =1 ; $index -le $numberOfMailboxes ; $index++)

{

$PFMailboxName = “Mailbox”+$index;

if($index -eq 1)

{

New-Mailbox -PublicFolder $PFMailboxName -HoldForMigration:$true -IsExcludedFromServingHiearchy:$true;

}

else

{

New-Mailbox -PublicFolder $PFMailboxName -IsExcludedFromServingHierarchy:$true

}

}

Login to Exchange 2013 Server

Creating the PF mailbox “PFMailbox” by using the below command

New-Mailbox -PublicFolder PFMailbox -HoldForMigration:$true

image

Now Open the public-folder-to-mailbox.csv file and Change to the PFmailbox name which you created.

and copy the CSV file to Exchange 2013 Server root C:\ drive.

image

Step 9:

Migrating the PF folders

New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase -Server <Source server name>) -CSVData (Get-Content <Folder to mailbox map path> -Encoding Byte)

==

You can add “ -AcceptLargeDataLoss –BadItemLimit “ Parameters if you encounter corrupted items.

For Example –

New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase -Server exch2010.testcareexchange.biz) -CSVData (Get-Content C:\public-folder-to-mailbox.csv -Encoding Byte)

image

To Check the Status of the Migration Request

you can run

Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | fl

On Completion it will show up as “AutoSuspended”

if the data is large its going to take some time 4 –5 GB / hour max .

image

Step 10:

Lock the public folders to complete the migration for final synchronization (This Step Involves DOWNTIME)

Note : Mail sent to mail-enabled public folders will be queued and won’t be delivered until the public folder migration is complete. (Mails can stay in the queue for up to 48 hours by default)

Login to Exchange 2010 Server

Set-OrganizationConfig –PublicFoldersLockedForMigration:$true

image

Step 11:

Resuming the Public folder migration to complete successfully .

Set-PublicFolderMigrationRequest -Identity \PublicFolderMigration -PreventCompletion:$falseResume-PublicFolderMigrationRequest -Identity \PublicFolderMigration

image

Check Status –

Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | fl

If some one is accessing the PF folders or any proxy failures or any live sessions its going to re attempt periodically.

image

Now it looks completed

image

image

Step 11:

Now to Test the PF migration status.

Setting the PF folders on a Test mailbox

Set-Mailbox -Identity test100 -DefaultPublicFolderMailbox PFmailbox

image

Now add the public folder mailbox

image

If your PF structure is huge. to confirm everything is ok . Redo Step2 with New .xml file names and you can compare those files before completion.

Step 12:

Exchange 2013 should start serving the Hierarchy

Run

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

image

Step 13:

On Completion Set PublicFolderMigrationComplete  to $true in Exchange 2010 Server.

Set-OrganizationConfig -PublicFolderMigrationComplete:$true

Step 14:

Removing Exchange 2010 Public Folder Database

image

 

Now Public Folders have been migrated from Exchange 2010 to Exchange 2013

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

5 COMMENTS

  1. Have you run across any issues during a PF migration to 2013 where folders that were mail enabled prior to migration no longer show mail enabled in the Exchange Admin Center?

    The email address’s still function, just no way to manage them in EAC. If set to Mail enabled, it creates a new AD object and loses the original email addresses unless they were backed up prior.

  2. I have this same issue. Are you saying to remove the AD object from Microsoft Exchange System Objects that currently has the email address that I’d like to use? Then mail enable the Public Folder? Is there a way to look at what email addresses are associated with the object?

  3. Hi, I am getting the same problem. How can I repair the Exchange object, or re-use the GUID? That way any Outlook users who have the address cached won’ get a bounce back message.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?