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?
Move public folder data to Exchange 2010
Public folders are an optional feature in Exchange 2010. If all client computers in your organization are running Microsoft Office Outlook 2007 or later, then public folders are an optional feature. However, if Outlook 2003 clients are in use, then public folders are required. In addition, if you're currently using public folders for collecting, organizing, or sharing documents and other information and you want to continue doing so, you can use public folder replication to move your public folder data to Exchange 2010.
Learn more at: Understanding Public Folder Replication 28
How do I do this?
You can use the Exchange Management Console to perform this task.
Note: Age limits should be used for public folders only. They should not be used for System Folders, such as OFFLINE ADDRESS BOOK or SCHEDULE+ FREE BUSY.
How do I know this worked?
You can use the Get-PublicFolder cmdlet in the Exchange Management Shell to verify replicas on the Exchange 2010 public folder database. For example, to determine the replicas for all public folders in the public folder tree, run the following command: Get-PublicFolder -Recurse | Format-List Name,Replicas To determine the replicas for all system folders, run the following command: Get-PublicFolder \NON_IPM_SUBTREE | Format-List Name,Replicas 29 Learn more about the cmdlet at: Get-PublicFolder
Visit Link : http://technet.microsoft.com/en-us/exdeploy2010/default.aspx#DeploymentCheckList/ee958313/2007
If you have UAC enabled, are you running the Exchange Management Shell as administrator (right click -> "Run as Administrator")?
I've had issues with the Public Folder scripts before when you don't use the run as admin option (addreplicatopfrecursive.ps1 and removereplicafromPFrecursive.ps1 won't work properly).
Read this:
http://technet.microsoft.com/en-us/library/bb691120.aspx