Today I want to share with you a nice script that I wrote for an easy Public Folders migration from Exchange 2010 to Exchange Online.
I wrote this script because the procedure for migrating these Public Folders is totally manual and sometimes frustrating.
Please consider the following:
- Requires Microsoft Exchange 2010 SP3 with Rollup 8
- The script relies on this TechNet: Use batch migration to migrate legacy public folders to Office 365 and Exchange Online
- You must download all the files from these locations:
- My script can be downloaded from the TechNet Gallery:
- All of the downloaded files must be placed in the same folder
- My script must be run from the Exchange 2010 Management Shell
This is where you need to write your tenant domain i.e.: onmicrosoft.com
Enter the FQDN of your Mailbox Role server which holds the Public Folders Database
The email address to send the Migration Batch results to
Office 365 Global Admin account credentials (i.e.: email@example.com)
Local Public Folders administrator account credential (i.e.: yourdomain\administrator)
You will be presented with a menu that has the following options:
1. Fully Automatic:
This option will migrate the public folders automatically without suspending.
Although it is states that it’s fully automatic, you may encounter some input stops because of the errors or warnings that this option may produce.
2. Automatic with autosuspend:
This option is almost identical to the previous option with the Migration Autosuspend flag.
You will be presented with an option to fully complete the migration
In this option you will have the ability to fully control the steps of the migration process throughout the following steps (Like in the TechNet article):
CSV files generation
Public Folder mailbox creation (Exchange Online)
The migration process itself
Public Folders lock (On-Premise) and migration finalization
Public Folders Online unlock and enablement operation
4. Stage Select:
Almost the same as the above but this time you will be able to select the exact step
If, for some reason, you were disconnected from the Exchange Online PowerShell, you will be able to reconnect and continue 🙂
For the purposes of this demonstration I used the Fully Automatic option.
The next screenshots shows some highlights of the outputs that the script may produce
The next screenshot shows an interaction that you may experience if you had a previous and unsuccessful Public Folders migration in which you had created a Migration Endpoint that should be re-created.
If for some reason (and it most likely to occur) your Public Folders database was successfully locked, but the finalization procedure is getting the opposite information, this may be because the Microsoft Exchange Information Store is not fully aware of the situation.
In this case you will need to re-mount the Public Folders database, or worst – to restart the Information Store service.
The re-mount option will be presented to you, however, if this should not succeed, you will be asked to exit the script and restart the Information Store service.
In the later, you could return to the script and select the “Stage Select” option from the menu, after which you should choose the 5th stage – it will lock and finalize the migration process.
Then, you should choose the 6th option from the “Stage Select” menu option to unlock the online Public Folders and enable them.
Hope you would use this script wisely and with caution.
I encourage you to go through the code and if have any questions, suggestions or unexpected errors during the script running process, please comment.