Step-By-Step: Modifying the Recoverable Items Folder in Office 365

Found in Exchange Online and in Exchange 2013, the Recoverable Items Folder was created to protect malicious or accidental deletion of data. This same function was known as dumpster in previous versions of Exchange and employs the following Exchange features:

  • Mailbox audit and Calendar logging
  • Deleted item retention
  • In-Place & Litigation Hold
  • Single item recovery

 

This Step-By-Step post will provide instruction on setting the RetainDeletedItemsFor value for both the Mailbox and the Mailbox Plan in Office 365 / Exchange Online. The default value is 14 days. The value is modified via PowerShell connected to Exchange Online.

NOTE:   Once the default value on premise is changed, the same value is to be set in Exchange Online as the mailbox you are moving to Exchange Online will get the value from Exchange Online.

 

Step 1: Connect to Exchange Online with PowerShell

Check out the video to provide instructions on connecting PowerShell to Exchange online:

Enter the following commands in PowerShell:

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

Step 2:View current MailboxPlan settings

Enter the following commands in PowerShell:

Get-MailboxPlan |ft Name,RetainDeletedItemsFor

 

Step 3: View current settings per mailbox

Enter the following commands in PowerShell:

Get-Mailbox -Identity User.Name | fl Identity,RetainDeletedItemsFor

 

Step 4: View the current setting all Mailboxes in Exchange Online

Enter the following commands in PowerShell:

Get-Mailbox | fl Identity,RetainDeletedItemsFor

NOTE:  Some of the names have been blacked out for security purposes.

 

The value can be changed for the whole mailbox plan or per mailbox. Per mailbox plan will catch all the newly created mailboxes including those migrated.

NOTE:  If you modify the setting after mailboxes have been created or migrated to Exchange Online, you will have to modify the value on those mailboxes as well as the mailbox plan. Basically after modifying the mailbox plan, all new mailboxes will get the new setting, while existing mailboxes will have to be updated.

NOTE: The default value is set to 14 days. The max value that you can set is 30 days.

Step 5: Change the current setting for the MailboxPlan in Exchange Online

Enter the following commands in PowerShell:

Get-MailboxPlan | Set-MailboxPlan -RetainDeletedItemsFor XX

The screen shot below shows the command to change the setting, followed by the command to verify.

Step 6: Change the current setting per mailbox

Enter the following commands in PowerShell:

Set-Mailbox –Identity username@domain.com -RetainDeletedItemsFor XX

The screen shot below shows the command to change the setting, followed by the command to verify.