My first attempt at using the Exchange Power Shell scripts for migrating public folders did not go so well. Thankfully, this was performed on a secondary Exchange server and not the primary legacy server. For reasons still unknown, public folder instances on the legacy Exchange server persisted even after running the somewhat scary ReplaceReplicaOnPFRecursive.ps1 power shell script for all of the public folder hierarchy. To work around this problem, I simply migrated using the old-fashioned (and tedious) method of adding the 2007 server as a replica to every public folder listed on the legacy server’s public folder database. After my end-users were satisfied that all of their data had replicated (again, this required an “update” for every public folder my 2007 server could see in the SP1 public folder tool), I removed the legacy server from the replication list using PFDAVAdmin.
This evening, I discovered an undocumented quirk in the RepliceReplica script that may have led to the problems I experienced with the first legacy server — though it requires a path for the top-level public folder, if the path has a space in it, you must use an additional set of apostrophes. I don’t know why I didn’t think of this the first time around, but the process seems to be running smoothly at the moment. I’m still very skeptical of running the script against the entire public folders folder, so I’m running it against each subfolder individually so I can literally watch the public folder instance disappear from the legacy server.
So it’s clear, to move the top-level folder entitled “A/P Staff” from my legacy server to the 2007 server, I had to issue the command as follows:
[PS] C:\Program Files\Microsoft\Exchange Server\Scripts>.\ReplaceReplicaOnPFRecursive.ps1 -TopPublicFolder “‘\A/P Staff’” -ServerToAdd %2007Server% -ServerToRemove %LegacyServer%
Luckily the Event Log, with almost verbose logging enabled for the Exchange 2007 server, still reports Replication Incoming/Outgoing 3028/3027 messages. The legacy server eventually removes the public folder instances once the replication is complete.
With one legacy server completely off and zero complaints thus far, I will be removing it from Active Directory tomorrow, fingers crossed!