[Today’s post comes to us courtesy of Shawn Sullivan from Commercial Technical Support]
This is an issue that we see customers run into from time to time and usually causes a lot of confusion and worry as to what the cause is, not to mention that it’s quite painful to lose important data. There are several reasons why data inside a public folder could become deleted, but if it’s happening to the same folder over and over again within a certain number of days, then almost certainly age limits have been enforced on the folder.
Note: Public Folder age limits refer life of the content inside the folders and not the life of the folder itself. There is no parameter for you to configure to have the folders themselves deleted automatically.
When dealing with Public Folder age limits, there are three settings that we need to be concerned with:
- Age limit for all folders in the public folder database (days), which equates to the ItemRetentionPeriod parameter specified on the Public Folder Database
- Use database age defaults, which equates to the UseDatabaseAgeDefaults parameter specified on the individual folder.
- Age limit for replicas (days), which equates to the AgeLimit parameter also specified on the individual folder.
We do not impose age limits at either the database or public folder level on a default installation of SBS 2008. The age limit is set to unlimited on the database itself and all folders you create within the database will use the database defaults. If you choose to, however, you can override this.
Important: When an age limit in days is specified using the parameters above, then the applicable content that has reached the limit will be deleted during the normal online database maintenance each morning at 2:00 am. The content is permanently removed from the database, it is not retained in deleted items. To recover it you must restore it from backup.
To verify the age limit specified at the database level using the Exchange Management Console, expand Server Configuration > Mailbox > Second Storage Group, open the properties of the Public Folder Database and click on the Limits tab. The age limit option is unchecked by default:
Using PowerShell, run Get-PublicFolderDatabase | fl Name,ItemRetentionPeriod. The parameter is set to unlimited by default:
To verify the settings on the folders themselves using the Public Folder Management Console, expand Default Public Folders, open the properties of the folder (right-click on the folder displayed in the middle pane) and click on the Limits tab. Use database age defaults is checked by default, which will disable the option to set a specific limit for the replica:
Using PowerShell, run Get-PublicFolder “\<folder>” | fl Name,UseDatabaseAgeDefaults,AgeLimit where <folder> is the name of the folder. If you are querying a subfolder, you would use “\<parentfolder>\<folder>”. UseDatabaseAgeDefaults is set to True and AgeLimit is disabled by default:
If you have a large hierarchy of public folders, you can use Exchange Powershell to export a list of each public folder and its settings to a text file for review. To do this, run the following command:
Get-PublicFolder “\” –Recurse | fl Name,AgeLimit,UseDatabaesAgeDefaults > List.txt
In this simple example, I have Public Folders “One” and “Two”. If “One” is set to default and “Two” has been configured to retain items for 7 days, then my output would look like this:
[PS] C:\Windows\System32>Get-PublicFolder “\” -Recurse | fl Name,AgeLimit,UseDatabaseAgeDefaults
Name : IPM_SUBTREE
UseDatabaseAgeDefaults : True
Name : One
UseDatabaseAgeDefaults : True
Name : Two
AgeLimit : 7.00:00:00
UseDatabaseAgeDefaults : False
Returning to Default Settings
If you find that age limits have been unintentionally enforced within the hierarchy and you wish to quickly revert all folders back to default, you can do so by running the following commands in sequence:
Get-PublicFolderDatabase | Set-PublicFolderDatabase –ItemRetentionPeriod Unlimited
Get-PublicFolder “\” -Recurse | Set-PublicFolder –UseDatabaseAgeDefaults $True