After Microsoft switched over to Modern Public Folders, I never thought I would have to worry or dig into the underworkings as much as we did in Exchange 2010 and before. I have been proven wrong twice now. My current issue is a corruption issue where I am unable to currently move certain mailboxes, even the main Primary Hierarchy mailbox, to another database. The server is displaying all the classic signs of a storage/hard drive problem with ESE errors and write or read errors in the Application log.
What I wanted to showcase here were a couple of sample PowerShell one-liners and scripts used to move Public Folder mailboxes and Public Folders as well as monitoring the progress of these moves.
Move Public Folder Mailbox
This is an easy one to work with. If we have a Public Folder mailbox and we need to move this mailbox to another database, possible on another DAG in the Exchange environment, the move cmdlet is very similar to that of a regular mailbox move:
New-MoveRequest -Identity PFMailbox01 -TargetDatabase PF1 -SuspendWhenReadyToComplete -BadItemLimit 10