Restore deleted public folders | Exchange Server 2013

An admin accidentally deleted couple of public folders recently from the Exchange Admin Center. Now we had to restore those public folders back. The first option most of us would try is to restore the public folder from Outlook.

Launch Outlook, select the Folders view first. Right click the root folder that hosted the deleted public folder and click on Recover Deleted Items. You will notice the deleted Public Folder here, now choose Restore Selected Items and click OK.

It might take some time depending on the size of the data and number of public folders for the folders to get restored.

However, in our case the restore through outlook was not successful as it used to timeout in between. Due to this, the next approach was to restore from the Exchange Management Shell.

First, execute the below command to export all public folder information. This might take some time depending on the size of the public folders.

Get-PublicFolder –Identity “\NON_IPM_SUBTREE” –Recurse | FL >C:\PF_Export.txt

The “\NON_IPM_SUBTREE” is actually the system folder root. These are system folders that are not accessible through clients like Outlook and OWA.

Now, open the exported file and search for the deleted folder name. Find the property Identity and copy the value as shown below

Launch the Exchange Management Shell and execute the below command to restore the deleted folder and its sub folders along with the public folder permissions:

Set-PublicFolder –Identity “\NON_IPM_SUBTREE\DUMPSTER_ROOT\<GUID>\FolderName” –Path “\” –Verbose

The above command restores the public folder to the root public folder hierarchy. You can also restore to the correct parent folder if you know the path.

In case you have multiple Active Directory domains, make sure that the restored public folder AD objects are moved to the correct domain where these existed previously. There are chances these AD objects stay in the root domain after the restore.

You can use this method of restore if the folders were deleted within the deleted item retention period. For cases where the folders were deleted beyond the retention period, you will have to restore the appropriate database full backup to a recovery database.

To find out more about restoring from a recovery database backup please refer here.