Quantcast
Channel: Practical 365
Viewing all articles
Browse latest Browse all 520

Exchange Server 2010 to 2013 Migration – Moving Public Folders

$
0
0

This article is part of a series on migrating from Exchange Server 2010 to 2013.

After moving all mailboxes from Exchange Server 2010 to 2013 we can turn our attention to the public folder migration.

exchange-2013-public-folders-01

Although Exchange Server 2013 provides support for public folders with the new modern public folders, you may wish to take this opportunity to review whether your organization needs to retain public folders at all. If they are no longer needed then removing them entirely from the Exchange organization would be simpler. However if that decision can’t be made, or they are still required for some reason, then a migration to Exchange 2013 can be performed.

The process to move public folders to Exchange 2013 is documented on TechNet:

At a high level the process involves:

  1. Downloading the migration scripts
  2. Preparing for the migration
  3. Generating the CSV files
  4. Creating the public folder mailboxes in Exchange 2013
  5. Starting the migration
  6. Lock the public folders for final migration (which requires some downtime)
  7. Finalize the migration (downtime still required)
  8. Test and unlock the public folder migration

Of course the reality is that there are many caveats and ways for a public folder migration to go wrong. Generally speaking you should always refer to the TechNet article as it will document the latest requirements and limitations for a public folder migration. However you can also refer to the following resources for some additional real-world advice:

Here is an example migration for the Exchange Server Pro organization, to show you what the end to end process looks like.

Download Scripts and Prepare Organization

The public folder migration scripts have been downloaded and saved to a server that has the Exchange 2010 management tools installed.

A snapshot of the existing public folder structure, statistics, and permissions is taken. These commands are run from the Exchange 2010 management shell.

[PS] C:\PFMigration>Get-PublicFolder -Recurse | Export-CliXML C:\PFMigration\Legacy_PFStructure.xml
[PS] C:\PFMigration>Get-PublicFolderStatistics | Export-CliXML C:\PFMigration\Legacy_PFStatistics.xml
[PS] C:\PFMigration>Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML C:\PFMigration\Legacy_PFPerms.xml

Any public folders that have a backslash in the name need to be renamed to remove the backslash. To identity those folders run the following command in the Exchange 2010 management shell.

[PS] C:\PFMigration>Get-PublicFolderStatistics -ResultSize Unlimited | Where {$_.Name -like "*\*"} | Format-List Name, Identity

Verify that no record exists of a previous public folder migration. The values returned here should be $false.

[PS] C:\PFMigration>Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete
PublicFoldersLockedForMigration : False
PublicFolderMigrationComplete   : False

In the Exchange 2013 management shell run the following commands to verify that there are no existing public folder migration requests, and no existing modern public folders.

[PS] C:\PFMigration>Get-PublicFolderMigrationRequest
[PS] C:\PFMigration>Get-Mailbox -PublicFolder
[PS] C:\PFMigration>Get-PublicFolder

Generate CSV Files and Create Public Folder Mailboxes

With the preparation completed we can now generate the CSV files that will be used to create the new public folder mailboxes on Exchange 2013. Run the following command in the Exchange 2010 management shell. Replace the server name HO-EX2010-PF with the name of one of your public folder servers.

[PS] C:\PFMigration>.\Export-PublicFolderStatistics.ps1 C:\PFMigration\PFSizeMap.csv HO-EX2010-PF
[7/25/2014 11:06:10 AM] Enumerating folders under NON_IPM_SUBTREE...
[7/25/2014 11:06:14 AM] Enumerating folders under NON_IPM_SUBTREE completed...44 folders found.
[7/25/2014 11:06:14 AM] Retrieving statistics from server BR-EX2010-MB
[7/25/2014 11:06:15 AM] Retrieving statistics from server BR-EX2010-MB complete...22 folders found.
[7/25/2014 11:06:15 AM] Total unique folders found : 22.
[7/25/2014 11:06:15 AM] Retrieving statistics from server HO-EX2010-PF
[7/25/2014 11:06:16 AM] Retrieving statistics from server HO-EX2010-PF complete...58 folders found.
[7/25/2014 11:06:16 AM] Total unique folders found : 58.
[7/25/2014 11:06:16 AM] Exporting statistics for 58 folders
[7/25/2014 11:06:16 AM] Exporting folders to a CSV file

Review the folder sizes in the CSV file and make a decision for how big each public folder mailbox will be. This will determine the number of public folder mailboxes created to store all of the public folder data in Exchange 2013. For example, if you have 20Gb of public folder data, and choose a maximum mailbox size of 1Gb, you will end up with 20 public folder mailboxes.

The Exchange Server Pro organization has very little public folder data, so a maximum size of 10Gb will result in a single public folder mailbox.

exchange-2013-public-folders-02

[PS] C:\PFMigration>.\PublicFolderToMailboxMapGenerator.ps1 10000000 C:\PFMigration\PFSizeMap.csv C:\PFMigration\PFMailboxMap.csv
[7/25/2014 11:11:25 AM] Reading public folder list...
[7/25/2014 11:11:25 AM] Loading folder hierarchy...
[7/25/2014 11:11:25 AM] Allocating folders to mailboxes...
[7/25/2014 11:11:25 AM] Trying to accomodate folders with their parent...
[7/25/2014 11:11:25 AM] Exporting folder mapping...

exchange-2013-public-folders-03

On an Exchange 2013 server create a public folder mailbox to be the master hierarchy mailbox.

[PS] C:\>New-Mailbox -PublicFolder PFHierarchy -HoldForMigration:$true
Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
PFHierarchy               PFHierarchy          ex2013srv2       Unlimited

Run the following command to create the additional public folder mailboxes to host the public folder content. The number of mailboxes is determined by the PF mailbox map generated in the previous step. In the case of the Exchange Server Pro organization only one mailbox is required.

[PS] C:\>for($index =1 ; $index -le $numberOfMailboxes ; $index++)
>> {
>>     $PFMailboxName = "Mailbox"+$index;  if($index -eq 1) {New-Mailbox -PublicFolder $PFMailboxName -HoldForMigration:$true -IsExcludedFromServingHierarchy:$true;}else{New-Mailbox -PublicFolder $PFMailboxName -IsExcludedFromServingHierarchy:$true}
>> }
>>
Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
Mailbox1                  Mailbox1             ex2013srv2       Unlimited

Migrating the Public Folders

With the new mailboxes created in Exchange 2013 we can proceed with the migration.

Note that you need the CSV file containing the PF mailbox map generated earlier, so copy that to a server with the Exchange 2013 management tools where you are running this command.

[PS] C:\>New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase -Server HO-EX2010-PF) -CSVData (Get-Content C:\PFMigration\PFMailboxMap.csv -Encoding Byte)
Name                                           SourceDatabase                                 Status
----                                           --------------                                 ------
PublicFolderMigration                          PF-HO-01                                       Queued

Monitor the progress of the public folder moves until they reach an AutoSuspended state.

[PS] C:\>Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics | ft -auto
Name                  StatusDetail  SourceDatabase PercentComplete
----                  ------------  -------------- ---------------
PublicFolderMigration AutoSuspended PF-HO-01       95

If you encounter a failed migration request you can look closer at the reasons for the failure.

[PS] C:\>Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics | fl failure*

For example, if the migration has failed due to bad items, you can set a higher bad item limit on the request and then resume it.

[PS] C:\>Get-PublicFolderMigrationRequest | Set-PublicFolderMigrationRequest -BadItemLimit 10
WARNING: When an item can't be read from the source database or it can't be written to the destination database, it
will be considered corrupted. By specifying a non-zero BadItemLimit, you are requesting Exchange not copy such items to
 the destination mailbox. At move completion, these corrupted items will not be available at the destination mailbox.

When the AutoSuspended state has been reached the legacy public folders can be locked for the final migration. This requires downtime, the length of which depends on how much new content has been generated in public folders since the AutoSuspended state was reached and will still need to be migrated.

In the Exchange 2010 management shell run the following command.

[PS] C:\>Set-OrganizationConfig -PublicFoldersLockedForMigration:$true

With the public folders locked we can complete the migration request. In the Exchange 2013 management shell run the following commands.

[PS] C:\>Set-PublicFolderMigrationRequest -Identity \PublicFolderMigration -PreventCompletion:$false
[PS] C:\>Resume-PublicFolderMigrationRequest -Identity \PublicFolderMigration

A test mailbox is set to use the Exchange 2013 public folder mailbox and used to test public folder functionality.

[PS] C:\>Set-Mailbox ex2013test -DefaultPublicFolderMailbox PFHierarchy

exchange-2013-public-folders-04

With the test successful the organization config is updated to indicate that the migration of public folders is complete. This command is run from the Exchange 2010 management shell.

[PS] C:\>Set-OrganizationConfig -PublicFolderMigrationComplete:$true

During the final migration phase when public folders were locked, regular users were unable to access the public folders in Outlook. After the migration completion flag is set above, and the users restart Outlook, they should be able to access public folders again. Any new items created by the test user should be visible as well.

exchange-2013-public-folders-05

In the next part of this article series we’ll look at decommissioning the legacy Exchange servers from the organization.

Return to the Exchange 2010 to 2013 migration series index page.


This article Exchange Server 2010 to 2013 Migration – Moving Public Folders is © 2014 ExchangeServerPro.com

Get more Exchange Server tips at ExchangeServerPro.com


Viewing all articles
Browse latest Browse all 520

Trending Articles