In this example there are two servers:
new-server and old-server
The first task to complete is to see what public folders are located on the old-server. To do that open the Exchange PowerShell as Administrator and enter:
Get-PublicFolderStatistics | Sort-Object -Descending ItemCount |ft -AutoSize
This gives us an idea of how many public folders there are and the item count. If you run the command on the new-server is should return only one result which is the NON_IPM_Subtree.
On the new-server open the Exchange PowerShell as Administrator and enter:
cd $exscripts
.\AddReplicaToPFRecursive.ps1 -TopPublicFolder “\” -ServerToAdd new-server
.\AddReplicaToPFRecursive.ps1 -TopPublicFolder “\NON_IPM_SUBTREE” -ServerToAdd new-server
This tells the old-server to add the new-server to it's list of servers to replicate public folders to for both System folder and User public folders.Still on the new server run these commands to check that the new-server will take replicas from the old-server.
Get-PublicFolder \ -Recurse | ft name,parentpath,replicas
Get-PublicFolder \NON_IPM_Subtree -Recurse | ft name,parentpath,replicas
Still on the old-server, we can now tell the old-server to move all it's replicas to the new-server via this PowerShell script:
./MoveAllReplicas.ps1 -Server old-server -NewServer new-server
Still on the old-server, we can now tell the old-server to move all it's replicas to the new-server via this PowerShell script:
./MoveAllReplicas.ps1 -Server old-server -NewServer new-server
On the new-server we should be able to see the public folder item count increasing. This can take some time to complete.
Get-PublicFolderStatistics | Sort-Object -Descending ItemCount |ft -AutoSize
Because this was originally a migration from Exchange 2003 to 2010 the 'servers' container was still present in ADSIEDIT.MSC which needed removing to prevent replication back-fill from failing.