I'm upgrading my organisation's Exchange set-up from 2007 to 2010 (by provisioning a new server with 2010 on, moving the mailboxes across, then decommissioning the 2007 server). The move went by without any real problems, however I've got a problem where I can't get rid of the old 2007 server without error messages.
The 2007 server has the Public Folder database on it still, when I try to Remove the Public Folder database from within EMC I get this error:
Microsoft Exchange Error
The public folder database 'Public Folder Database' cannot be deleted.
Public Folder Database Failed Error: The public folder database "OLDSERVER\Second Storage Group\Public Folder Database" contains folder replicas. Before deleting the public folder database, remove the folders or move the replicas to another public folder database. For detailed instructions about how to remove a public folder database, see http://go.microsoft.com/fwlink/?linkid=81409.
OK
I followed the links and saw that I need to move all the replicas within the database using this command:
.\MoveAllReplicas.ps1 -Server Server01 -NewServer Server02
So I ran it:
[PS] C:\Program Files\Microsoft\Exchange Server\Scripts>.\MoveAllReplicas.ps1 -Server "OLDSERVER" -NewServer "NEWSERVER"
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
Set-PublicFolder : The parameter "Replicas" cannot be $null or an empty array.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ReplaceReplicaOnPFRecursive.ps1:147 char:24
+ $_ | set-publicfolder <<<< -server $_.OriginatingServer;
[PS] C:\Program Files\Microsoft\Exchange Server\Scripts>
When I run the same command from the Exchange 2010 shell it simply quits and returns to the shell prompt. I still get the Replica error when I try to remove the Public Folders database.
I had a look around inside the 2010 version of ReplaceReplicaOnPFRecursive.ps1 and it turns out that it doesn't do anything at all with the data it's given. The recursive list of folders to modify that it builds is empty, so no commands end up being executed.
Any ideas?