To complete a public folder migration from Exchange 2013/2016 to Exchange Online you need to run
Set-OrganizationConfig -PublicFolderMailboxesLockedForNewConnections $true
But if you look at lots of the documentation that is out there with their tips and tricks etc. you will see that lots of them say:
Set-OrganizationConfig –PublicFoldersLockedForMigration $true
So very near – but its the wrong cmdlet now and it does nothing. It does not lock out the public folders and in the cloud all you get is:
PS C:\Users\BrianReid> Complete-MigrationBatch PublicFolderMigration
The public folders in the source environment are not ready for finalizing the migration. Make sure that public folder
access is locked on the source Exchange server, and there are no active public folder mailbox moves or public folder
moves in the source.
+ FullyQualifiedErrorId : [Server=VI1PR09MB2909,RequestId=ca0ffb4a-cc9f-4195-94fd-e3dd060587e6,TimeStamp=13/12/2018 18:03:00] [FailureCategory=Cmdlet-MigrationBatchCannotBeCompletedException] 2FB8651C,Microsoft.Exchange.Management.Migration.MigrationService.Batch.CompleteMigrationBatch
+ PSComputerName : outlook.office365.com
And there is nothing useful on the web for this error, so I wrote this to help you get out of this hole!
Run the correct cmdlet and migrations will start!