SOLVED

How to Recreate Public Folder Primary Hierarchy

Copper Contributor

In our Exchange Admin Center, there was a Public Folder Mailbox, someone created that was more specific to a department than to the company.  It was set as the Primary Hierarchy.  I was able to successfully remove it and there are no public folders showing now.

When I create a new Public Folder Mailbox, it gets created as a Secondary Hierarchy.  

How do I get it to be the Primary Hierarchy?

6 Replies

Hello @Vasil Michev ,

I have excatly the same issue as @bfry24 . 

I checked the link you mentioned. Unfortunately, there is no hint on how to create a Public Folder with Primary Hierarchy.

 

I have completely removed all public folders and public folder mailboxes and start from scratch.  However, when I create the public folder mailbox again, it will always be Secondary Hierarchy.

 

How can I create a public folder mailbox that is Primary Hierarchy? I can completely start from scratch again, if needed.

 

It seems to me that the first time ever a public folder mailbox has been created, the Primary Hierarchy is not available anymore for subsequent public folder mailboxes. This seems also the case if all the public folder mailboxes were removed. The next (seemingly first) public folder mailbox thus gets Secondary Hierarchy and not Primary Hierarchy. 

 

In my case, I only have a Secondary Hierarchy and all public folders I create are just not visible for the clients/users.

 

Can you help?

Dan

 

best response confirmed by bfry24 (Copper Contributor)
Solution

Hello @bfry24 ,

In the meantime I got a response from Office 365 support (this time *very* fast and very competent). 

After some combined investigation, my problem is solved. Perhaps it works for you too.

 

The key element was the following Powershell command in the Office 365 session:

 

Get-Mailbox -PublicFolder | Update-PublicFolderMailbox -InvokeSynchronizer -SuppressStatus

 

Shortly after that command, my public folder mailbox turned from "Secondary Hierarchy" into "Primary Hierarchy". After that, the public folder structure became visible to the users. 

 

Regards

Daniel

 

 

@DanHuber Did you change anything in the script?  Does not work for me.  Can I ask what you named your public folder mailbox?

@DanHuber Ignore the last response as it did work.

 

Thank you

@bfry24 

 

The option -SuppressStatus disables any output. If you leave it away, it would use your PowerShell connection and send a status update every few seconds. 

 

It took a couple of minutes and Secondary Hierarchy turned to Primary Hierarchy in my case. Perhaps it takes a bit longer for you?

 

Here are some cmdlets I was using. As you see, my public folder mailbox is named "SGAIM"

 

# create public folder mailbox (in my case, I deleted all other before this)
New-Mailbox -PublicFolder -Name SGAIM
# created a test public folder. I created the real ones later in Outlook, 
# since here I cannot set the type of the folder.. I want contact folders...
New-PublicFolder -Name "Global Contacts"
# this checks if the foolder was created
Get-PublicFolder “\” -Recurse
# some more information
Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select Identity, User, AccessRights
# this checks if the default public folder for each user is set correctly
Get-Mailbox | ft Name,DefaultPublicFolderMailbox
# otherwise I can set it here
Get-Mailbox -resultsize unlimited | Set-Mailbox -defaultpublicfoldermailbox "SGAIM" 
# this one is not for the faint of heart.. 
# but it told me that something was wrong with the synchronisation. 
# hence the -InvokeSynchronizer option I used earlier
Get-PublicFolderMailboxDiagnostics -Identity SGAIM
# just for test, I add another public folder mailbox
New-Mailbox -PublicFolder -Name TEST2
# I *think* that the following tells me something about Primary vs. 
# Secondary Hierarchy, but I'm not 100% sure. 
# At least the output is TRUE for SGAIM and FALSE for TEST2
Get-Mailbox -PublicFolder | fl Name,IsRootPublicFolderMailbox

 

1 best response

Accepted Solutions
best response confirmed by bfry24 (Copper Contributor)
Solution

Hello @bfry24 ,

In the meantime I got a response from Office 365 support (this time *very* fast and very competent). 

After some combined investigation, my problem is solved. Perhaps it works for you too.

 

The key element was the following Powershell command in the Office 365 session:

 

Get-Mailbox -PublicFolder | Update-PublicFolderMailbox -InvokeSynchronizer -SuppressStatus

 

Shortly after that command, my public folder mailbox turned from "Secondary Hierarchy" into "Primary Hierarchy". After that, the public folder structure became visible to the users. 

 

Regards

Daniel

 

 

View solution in original post