SOLVED
Home

How to Recreate Public Folder Primary Hierarchy

%3CLINGO-SUB%20id%3D%22lingo-sub-1002389%22%20slang%3D%22en-US%22%3EHow%20to%20Recreate%20Public%20Folder%20Primary%20Hierarchy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002389%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20our%20Exchange%20Admin%20Center%2C%20there%20was%20a%20Public%20Folder%20Mailbox%2C%20someone%20created%20that%20was%20more%20specific%20to%20a%20department%20than%20to%20the%20company.%26nbsp%3B%20It%20was%20set%20as%20the%20Primary%20Hierarchy.%26nbsp%3B%20I%20was%20able%20to%20successfully%20remove%20it%20and%20there%20are%20no%20public%20folders%20showing%20now.%3C%2FP%3E%3CP%3EWhen%20I%20create%20a%20new%20Public%20Folder%20Mailbox%2C%20it%20gets%20created%20as%20a%20Secondary%20Hierarchy.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20do%20I%20get%20it%20to%20be%20the%20Primary%20Hierarchy%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1002389%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1003214%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Recreate%20Public%20Folder%20Primary%20Hierarchy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1003214%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20control%20this%20via%20the%20Set-Mailbox%20cmdlet%2C%20see%20more%20tips%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExchange-Team-Blog%2FModern-public-folder-deployment-best-practices%2Fba-p%2F606172%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExchange-Team-Blog%2FModern-public-folder-deployment-best-practices%2Fba-p%2F606172%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1004851%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Recreate%20Public%20Folder%20Primary%20Hierarchy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1004851%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EI%20have%20excatly%20the%20same%20issue%20as%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F317784%22%20target%3D%22_blank%22%3E%40bfry24%3C%2FA%3E%26nbsp%3B.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20checked%20the%20link%20you%20mentioned.%20Unfortunately%2C%20there%20is%20no%20hint%20on%20how%20to%20create%20a%20Public%20Folder%20with%20Primary%20Hierarchy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20completely%20removed%20all%20public%20folders%20and%20public%20folder%20mailboxes%20and%20start%20from%20scratch.%26nbsp%3B%20However%2C%20when%20I%20create%20the%20public%20folder%20mailbox%20again%2C%20it%20will%20always%20be%20Secondary%20Hierarchy.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20I%20create%20a%20public%20folder%20mailbox%20that%20is%20Primary%20Hierarchy%3F%20I%20can%20completely%20start%20from%20scratch%20again%2C%20if%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20to%20me%20that%20the%20first%20time%20ever%20a%20public%20folder%20mailbox%20has%20been%20created%2C%20the%20Primary%20Hierarchy%20is%20not%20available%20anymore%20for%20subsequent%20public%20folder%20mailboxes.%20This%20seems%20also%20the%20case%20if%20all%20the%20public%20folder%20mailboxes%20were%20removed.%20The%20next%20(seemingly%20first)%20public%20folder%20mailbox%20thus%20gets%20Secondary%20Hierarchy%20and%20not%20Primary%20Hierarchy.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20case%2C%20I%20only%20have%20a%20Secondary%20Hierarchy%20and%20all%20public%20folders%20I%20create%20are%20just%20not%20visible%20for%20the%20clients%2Fusers.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20help%3F%3C%2FP%3E%3CP%3EDan%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1005996%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Recreate%20Public%20Folder%20Primary%20Hierarchy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1005996%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F317784%22%20target%3D%22_blank%22%3E%40bfry24%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EIn%20the%20meantime%20I%20got%20a%20response%20from%20Office%20365%20support%20(this%20time%20*very*%20fast%20and%20very%20competent).%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20some%20combined%20investigation%2C%20my%20problem%20is%20solved.%20Perhaps%20it%20works%20for%20you%20too.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20key%20element%20was%20the%20following%20Powershell%20command%20in%20the%20Office%20365%20session%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EGet-Mailbox%20-PublicFolder%20%7C%20Update-PublicFolderMailbox%20-InvokeSynchronizer%20-SuppressStatus%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EShortly%20after%20that%20command%2C%20my%20public%20folder%20mailbox%20turned%20from%20%22Secondary%20Hierarchy%22%20into%20%22Primary%20Hierarchy%22.%20After%20that%2C%20the%20public%20folder%20structure%20became%20visible%20to%20the%20users.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3EDaniel%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1006137%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Recreate%20Public%20Folder%20Primary%20Hierarchy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1006137%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F273644%22%20target%3D%22_blank%22%3E%40DanHuber%3C%2FA%3E%26nbsp%3BDid%20you%20change%20anything%20in%20the%20script%3F%26nbsp%3B%20Does%20not%20work%20for%20me.%26nbsp%3B%20Can%20I%20ask%20what%20you%20named%20your%20public%20folder%20mailbox%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1006314%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Recreate%20Public%20Folder%20Primary%20Hierarchy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1006314%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F273644%22%20target%3D%22_blank%22%3E%40DanHuber%3C%2FA%3E%26nbsp%3BIgnore%20the%20last%20response%20as%20it%20did%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1006352%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Recreate%20Public%20Folder%20Primary%20Hierarchy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1006352%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F317784%22%20target%3D%22_blank%22%3E%40bfry24%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20option%26nbsp%3B-SuppressStatus%20disables%20any%20output.%20If%20you%20leave%20it%20away%2C%20it%20would%20use%20your%20PowerShell%20connection%20and%20send%20a%20status%20update%20every%20few%20seconds.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20took%20a%20couple%20of%20minutes%20and%20Secondary%20Hierarchy%20turned%20to%20Primary%20Hierarchy%20in%20my%20case.%20Perhaps%20it%20takes%20a%20bit%20longer%20for%20you%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20are%20some%20cmdlets%20I%20was%20using.%20As%20you%20see%2C%20my%20public%20folder%20mailbox%20is%20named%20%22SGAIM%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%20create%20public%20folder%20mailbox%20(in%20my%20case%2C%20I%20deleted%20all%20other%20before%20this)%0ANew-Mailbox%20-PublicFolder%20-Name%20SGAIM%0A%23%20created%20a%20test%20public%20folder.%20I%20created%20the%20real%20ones%20later%20in%20Outlook%2C%20%0A%23%20since%20here%20I%20cannot%20set%20the%20type%20of%20the%20folder..%20I%20want%20contact%20folders...%0ANew-PublicFolder%20-Name%20%22Global%20Contacts%22%0A%23%20this%20checks%20if%20the%20foolder%20was%20created%0AGet-PublicFolder%20%E2%80%9C%5C%E2%80%9D%20-Recurse%0A%23%20some%20more%20information%0AGet-PublicFolder%20-Recurse%20%7C%20Get-PublicFolderClientPermission%20%7C%20Select%20Identity%2C%20User%2C%20AccessRights%0A%23%20this%20checks%20if%20the%20default%20public%20folder%20for%20each%20user%20is%20set%20correctly%0AGet-Mailbox%20%7C%20ft%20Name%2CDefaultPublicFolderMailbox%0A%23%20otherwise%20I%20can%20set%20it%20here%0AGet-Mailbox%20-resultsize%20unlimited%20%7C%20Set-Mailbox%20-defaultpublicfoldermailbox%20%22SGAIM%22%20%0A%23%20this%20one%20is%20not%20for%20the%20faint%20of%20heart..%20%0A%23%20but%20it%20told%20me%20that%20something%20was%20wrong%20with%20the%20synchronisation.%20%0A%23%20hence%20the%20-InvokeSynchronizer%20option%20I%20used%20earlier%0AGet-PublicFolderMailboxDiagnostics%20-Identity%20SGAIM%0A%23%20just%20for%20test%2C%20I%20add%20another%20public%20folder%20mailbox%0ANew-Mailbox%20-PublicFolder%20-Name%20TEST2%0A%23%20I%20*think*%20that%20the%20following%20tells%20me%20something%20about%20Primary%20vs.%20%0A%23%20Secondary%20Hierarchy%2C%20but%20I'm%20not%20100%25%20sure.%20%0A%23%20At%20least%20the%20output%20is%20TRUE%20for%20SGAIM%20and%20FALSE%20for%20TEST2%0AGet-Mailbox%20-PublicFolder%20%7C%20fl%20Name%2CIsRootPublicFolderMailbox%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
bfry24
New 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
Highlighted

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

 

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