Move Exchange Server public folders

Updated: November 12, 2009

Applies To: Windows SBS 2008

Exchange Server 2007 does not create a Public Folder database when a server on the network already has a Public Folder database. Before moving the public folder database from the Source Server, you must create a storage group and a Public Folder database on the Destination Server.

To create an Exchange Server storage group and a Public Folder database

  1. On the Destination Server, click Start, click All Programs, click Microsoft Exchange Server 2007, and then click Exchange Management Console.

  2. Click Continue on the User Account Control dialog box.

  3. In the navigation pane, expand Server Configuration, and then click Mailbox.

  4. In the Actions pane, click New Storage Group.

  5. On the New Storage Group page, in the text box for the name of the storage group, type Second Storage Group, click New, and then click Finish.

  6. In the work pane, click Second Storage Group, and then in the Actions pane click New Public Folder Database.

  7. On the New Public Folder Database page, in the Public folder database name text box, type Public Folder Database, click New, and then click Finish.

Before you move the public folders to the Destination Server, run the GetPublicFolderStatistics command. The Get-PublicFolderStatistics command lists all the data that is contained in the public folder store.

To run the GetPublicFolderStatistics command

  1. On the Destination Server, click Start, click All Programs, click Exchange Server 2007, and then click Exchange Management Shell.

  2. At the Windows PowerShell prompt, type cd ‘C:\Program Files\Microsoft\Exchange Server\Scripts’ and then press ENTER.

Note

Include the single quotation mark when you type the command.

  1. Type the following, and then press ENTER:

    Get-PublicFolderStatistics –server <SourceServerName> | fl | out-file C:\Users\<YourUserName>\Documents\PF<SourceServerName>stat.txt

  2. Open the text file to verify that all of the public folders on the Source Server are listed.

You can use the MoveAllReplicas.ps1 script to move all Exchange Server public folders from the Source Server to the Destination Server.

To move Exchange Server public folders to the Destination Server

  1. On the Destination Server, click Start, click All Programs, click Exchange Server 2007, and then click Exchange Management Shell.

  2. At the Windows PowerShell prompt, type cd ‘C:\Program Files\Microsoft\Exchange Server\Scripts’ and then press ENTER.

Note

Include the single quotation marks when you type the command.

  1. Type the following, and then press ENTER:

    MoveAllReplicas.ps1 –Server <SourceServerName>–NewServer<DestinationServerName>

Note

It can take up to 24 hours to move all public folders to the Destination Server.

You must wait for the next instance of public folder replication to finish before the public folder replicas are removed. You can verify the status by using the Get-PublicFolderStatistics command.

To run the GetPublicFolderStatistics command

  1. On the Destination Server, click Start, click All Programs, click Exchange Server 2007, and then click Exchange Management Shell.

  2. At the Windows PowerShell prompt, type cd ‘C:\Program Files\Microsoft\Exchange Server\Scripts’ and then press ENTER.

Note

Include the single quotation marks when you type the command.

  1. Type the following, and then press ENTER:

    Get-PublicFolderStatistics –server <DestinationServerName> | fl | out-file C:\Users\<YourUserName>\Documents\PF<DestinationServerName>stat.txt

  2. To verify that the public folder replication is complete, open the text file that you just generated and compare it to the text file that contains the public folder data on the Source Server.

After the public folders are moved to the Destination Server, you must set the default Public Folder database on the Destination Server.

To set the default Public Folder database on the Destination Server

  1. On the Destination Server, click Start, click All Programs, click Microsoft Exchange Server 2007, and then click Exchange Management Console.

  2. In the User Account Control dialog box, click Continue.

  3. In the navigation pane, expand Server Configuration, and then click Mailbox.

  4. In the results pane, under First Storage Group, right-click Mailbox Database, and then click Properties.

  5. On the Client Settings tab, do the following:

    1. Click Browse on Default public folder database.

    2. In the Select Public Folder Database dialog box, select the Destination Server, and then click OK.

  6. Click OK.

To run the Remove-PublicFolderDatabase command

  1. On the Destination Server, click Start, click All Programs, click Exchange Server 2007, and then click Exchange Management Shell.

  2. At the Windows PowerShell prompt, type cd ‘C:\Program Files\Microsoft\Exchange Server\Scripts’, and then press ENTER.

Note

Include the single quotation marks when you type the command.

  1. At the command prompt, type the following, and then press ENTER:

    Remove–PublicFolderDatabase –Identity "<Server Name>\<Storage Group Name>\<Public Folder Database Name>”

    For example, to remove a database named "MyServer\Second Storage Group\Public Folder Database", type the command:

    Remove–PublicFolderDatabase –Identity "MyServer\Second Storage Group\Public Folder Database”

For more information about migrating public folders and for detailed troubleshooting steps, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkID=123793).