We are undergoing a Exchange 2010 to O365 migration and put domain in Hybrid mode (using https://docs.microsoft.com/en-us/exchange/hybrid-configuration-wizard), then put Public Folder in Hybrid mode (using https://docs.microsoft.com/en-us/exchange/collaboration-exo/public-folders/set-up-legacy-hybrid-public-folders), while we migrated users in small batches. Once users had been all migrated, we used https://docs.microsoft.com/en-us/exchange/collaboration-exo/public-folders/batch-migration-of-legacy-public-folders to try and migrate the Public Folders, but it failed at step 7 (Complete migration) due to Public Folders due to “More than 10 mail public folders in Active Directory were not linked to any pubic folder during migration”.
After some days speaking to our O365 support company without fixing the issue, we decided to speed thing up by exporting and importing data via PST. The day we did this, I exported the existing Public Folders to PST, ran `Set-OrganizationConfig -RemotePublicFolderMailboxes $ Null -PublicFoldersEnabled Local’ and when the old full ones had disappeared and the new empty ones appeared began to import the PST’s into the prior created Public Folders in a new Public Folder Mailbox in O365 EAC.
When I went to mail enable these new public folders, I couldn’t due to the SMTP address being used by the on-prem Public Folders still having them, so I removed all Public Folder objects from cpja.com\Microsoft Exchange System Objects via AD Users and Computers, then waited for the next AD sync; next removed the PFBybridDatabase (and the mailbox contained with it, first) in on-prem exchange, then waiting for another AD sync; and lastly then trying turning off Public Folder Synchronization in AD Sync, all without removal of the duplicates. I did notice PFMailbox1 changing from the Secondary Hierarchy, to Primary around this time, which from my reading made me think that the Public Folders in the original hidden mailbox that was created as part of the Public Folder hybrid setup was gone, and therefore the duplicates would disappear, but 24 hours on they still appear in the GAL, and in other places (see below).
The below cmdlet lists all of the offending Public Folders (the ones without -PF), but the
remove-public folder cmdlet only allows one to reference a Public Folder by it’s position in the Public Folder folder hierarchy, not alias, identity, GUID, etc. As these are not visible, I am lost for the next step (Microsoft has been contacted but it seems it may take days for them to escalate the ticket to Tier2/3 who I trust will know how to help quickly).
The new Public Folders are working fine in every other way, apart from the inability to set their e-mail address as they were set on the old on-prem ones. Has anyone got any experience with removing Public Folders a less conventional way?