PS C:\pf> New-PublicFolder "Green Monster" -Mailbox SecondaryN1
In the example below, 10 Public Folders are being created on the SecondaryN1 Public Folder Mailbox:PS C:\pf> 1..10 | %{New-PublicFolder -Name ("PublicFolder_{0:00}" -f $_) -Mailbox SecondaryN1}
Things are going smooth for some time, until they hire a new Admin (we’ll call him “Chuckie Sullivan”) who for whatever reason, decided to delete both of their Public Folder Mailboxes. Taking it a step further, he created a new Primary and named it “PrimaryN2.” Once he realized the error of his ways, Chuckie recovered the former Secondary Public Folder Mailbox (SecondaryN1) to get the content back.Undo-SoftDeletedMailbox -PublicFolder
In Office 365, when a Public Folder Mailbox is deleted, rather than permanently deleting it right away, PF mailboxes are now “Soft Deleted.” These soft deleted Public Folder mailboxes can be located using Get-Mailbox -PublicFolder -ShowSoftDeletedMailbox: In Office 365, these Public Folder Mailboxes are now available for recovery using Undo-SoftDeletedMailbox -PublicFolder: W00t! Now we have a Primary PF Mailbox (PrimaryN2), but it has no clue about all that glorious data that was recovered via Undo-SoftDeletedMailbox -PublicFolder. When Public Folder Hierarchy sync finds Public Folders that don’t exist on the Primary, it re-creates them under a special folder called “LOST_AND_FOUND.” This resides at the root of the NON_IPM_SUBTREE, so it is not shown to end users via Outlook Web App or Outlook.Get-PublicFolder -LostAndFound
In our example, the SecondaryN1 Public Folder Mailbox that was recovered contained 10 Public Folders (PublicFolder_01 – 10). Once Hierarchy Sync executed, it keenly noticed that these were not represented in the PF hierarchy on the Primary. Next, the PF hierarchy reconciliation process (initiated by the Public Folder Mailbox Assistant) created a new Folder on the Primary PF Mailbox under \NON_IPM_SUBTREE\LOST_AND_FOUND, and used the ExchangeGuid of the recovered mailbox as the name (e.g. 25e6e0a3-d601-403a-aca5-9144962ef54b). Finally, PF hierarchy reconciliation moved the formerly orphaned Public Folders (“PublicFolder_01-10”) from the recovered Secondary PF Mailbox to this new folder on the Primary:PS C:\pf> Get-PublicFolder -LostAndFound | ft -a
For more information on the mechanics of Public Folder Hierarchy Sync, I encourage you to check out “The Latest on Modern Public Folders” as presented at Microsoft Ignite 2015 by Ladislau Conceicao, Brian Day, and Kanika Ramji. In the meantime, this simplified attempt at illustrating these concepts may help this scenario to be easier to understand. There is a new property called LostAndFoundFolderOriginalPath that is added to each Public Folder to keep track of where the folder originated in the Public Folder hierarchy. Let’s say we wanted to find out where PublicFolder_02 originally lived: This shows us that PublicFolder_02 originally lived at the root of the Public Folder hierarchy. Now we can run Get-PublicFolder and Set-PublicFolder against these Public Folders like we normally would. For example, here is how to retrieve a Public Folder out of LOST_AND_FOUND and back into the regular Public Folder hierarchy for end users to use again: Awwyeah! We have successfully rescued PublicFolder_02 from what would have previously been certain death for that Public Folder. Here’s another example illustrating that the same steps are applicable for Subfolders of parent Public Folders. We have three Public Folders: "Fenway Park," "Right Field," and "Pesky Pole." The Public Folder hierarchy is illustrated below:Fenway Park
\Right Field
\Pesky Pole
PS C:\pf> Get-PublicFolder
Name Parent Path ---- ----------- Fenway Park \ Right Field \Fenway Park Pesky Pole \Fenway Park\Right Field In this disaster recovery example, we have created a new Primary PF Mailbox, and recovered the former PF Mailbox which contained these Public Folders. As we can see with Get-PublicFolder -LostAndFound, here are the previously-orphaned Public Folders, now conveniently placed in the LOST_AND_FOUND Public Folder:PS C:\pf> Get-PublicFolder -LostAndFound | ft -a
Name Parent Path ---- ----------- Fenway Park \NON_IPM_SUBTREE\LOST_AND_FOUND\5773ba6a-9926-4d64-97db-63a2bdd94a5b Pesky Pole \NON_IPM_SUBTREE\LOST_AND_FOUND\5773ba6a-9926-4d64-97db-63a2bdd94a5b Right Field \NON_IPM_SUBTREE\LOST_AND_FOUND\5773ba6a-9926-4d64-97db-63a2bdd94a5b For sake of discussion, we only want to restore "Pesky Pole," so we'll re-create the top-level "Fenway Park," and its subfolder "Right Field."PS C:\pf> New-PublicFolder "Fenway Park"
Name Parent Path
---- -----------
Fenway Park \
PS C:\pf> Get-PublicFolder \NON_IPM_SUBTREE\LOST_AND_FOUND\5773ba6a-9926-4d64-97db-63a2bdd94a5b\"Pesky Pole" | Set-PublicFolder -Path "\Fenway Park\Right Field"
PS C:\pf> Get-PublicFolder “Fenway Park” -Recurse Name Parent Path ---- ----------- Fenway Park \ Right Field \Fenway Park Pesky Pole \Fenway Park\Right Field Play ball!You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.