How to Recreate Public Folder Master hierarchy in Exchange 2013

At times in Exchange 2013, If you remove the Public Folder Mailbox which holds the Master hierarchy abruptly, Or deleting Using Adsiedit.msc , It doesn’t get removed properly

Where as a result of that master hierarchy goes disappeared. Even if you Create Public Folders it will create as Secondary hierarchy

So in the First place. We need to find the Hidden Master hierarchy

Running the Below Command , It will show Which mailbox is the Master hierarchy

Get-OrganizationConfig | Format-List RootPublicFolderMailbox

Get the ExchangeGuid Value from RootPubicFolderMailbox

Now Run

Get-Mailbox –PublicFolder | FL Name,ExchangeGuid

Now you can see which Public Folder holds the Master hierarchy

If you are seeing it , Its Good , Its available

But if you are not seeing the ExchangeGuid on this list . It means something went wrong.

As Changing the Master hierarchy is bit Tricky and Tweaking the architecture. We won’t know what its going to mess up

If you are in the starting phase, I would recommend to Remove all the Public Folders and Public Folder mailboxes

and Start from scratch

Removing all Public Folders

Get-PublicFolder –Recurse | Remove-PublicFolder

Removing all PublicFolder Mailboxes

Get-Mailbox –PublicFolder | Remove-Mailbox -PublicFolder

Now open Adsiedit.msc – Connect to

Choose Configuration

Expand Configuration –Services – Microsoft Exchange – “Your Exchange Org Name” (Properties)

Find “MsExchDefaultPublicFolderMailbox”

Cick on Edit and Click on Clear

Choose Ok and Ok again

Now the Master hierarchy goes empty

Now create a PF mailbox

New-Maibox PF1 –PublicFolder

Which becomes the master hierarchy