Public folder mailboxes cannot be moved while public folder migration is in progress

After moving all public folders to Exchange Online, the old public folder mailboxes are still on Exchange 2016. During the retention period of 180 days we wanted to consolidate them on new Exchange 2019 servers. But how to move them? Using a New-MoveRequest command fails with the following error:

[PS] C:\>get-mailbox -PublicFolder -Identity mailbox8 | New-MoveRequest -TargetDatabase DB001
Public folder mailboxes cannot be moved while public folder migration is in progress.
    + CategoryInfo          : InvalidOperation: (contoso.com/Users/Mailbox8:MailboxOrMailUserIdParameter) [New-MoveRequest], RecipientTaskException
    + FullyQualifiedErrorId : [Server=EXCH01,RequestId=d0b7d4c3-2392-4132-a70b-4ccaa385b312,TimeStamp=14-11-2022 18:08:10] [FailureCategory=Cmdlet-RecipientTaskException] 9A85A258,Microsoft.Exchange.Management.Migration.MailboxReplication.MoveRequest.NewMoveRequest
    + PSComputerName        : Exch01.contoso.com
[PS] C:\>

As shown in the following screenshot:

This is caused by the fact that the old public folders are locked and thus invisible. To move the public folder mailboxes to other mailbox databases, open them using the following commands on the Exchange server:

[PS] C:\> Set-OrganizationConfig -PublicFolderMailboxesLockedForNewConnections $false
[PS] C:\> Set-OrganizationConfig -PublicFolderMailboxesMigrationComplete $false
[PS] C:\> Set-OrganizationConfig -PublicFoldersEnabled: Local

After executing these commands the public folders mailboxes can be moved to other (new) mailbox databases. Another thing is that you can access the old public folders using Outlook to retrieve data from them in case of some sort of disaster recovery (like users deleting items from public folders in Exchange Online that cannot be found anymore).

Be aware though that you are not the only one that can ‘suddenly’ see the old public folders. If you have outlook users connecting to a mailbox in Exchange server, the public folders will magically appear for them too.

When done, close the public folders again using the following commands:

[PS] C:\> Set-OrganizationConfig -PublicFolderMailboxesLockedForNewConnections $True
[PS] C:\> Set-OrganizationConfig -PublicFolderMailboxesMigrationComplete $True
[PS] C:\> Set-OrganizationConfig -PublicFoldersEnabled: Remote

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s