


You can restore and purge one item, multiple items, or all items. Change deleted items retention period for single mailboxĬonnect to Exchange Online PowerShell. Run the Get-Mailbox cmdlet to check the deleted items retention period for the single user. PS C:\> Get-Mailbox | ft Name,RetainDeletedItemsFor The retention period for the user is set for 14 days, which is the default.

PS C:\> Set-Mailbox -RetainDeletedItemsFor "30" Run the Set-Mailbox cmdlet to set the deleted items retention period for a single user. In the next step, we will look at how to extend the deleted items retention period for all the users Change deleted items retention period for all mailboxes PS C:\> Get-Mailbox -ResultSize Unlimited | ft Name,RetainDeletedItemsFor Run the Get-Mailbox cmdlet to check the deleted items retention period for all users. PS C:\> Get-Mailbox -ResultSize Unlimited | Set-Mailbox -RetainDeletedItemsFor "30" Run the Set-Mailbox cmdlet to set the deleted items retention period for all mailboxes. PS C:\> Get-Mailbox -ResultSize Unlimited -Filter "RecipientTypeDetails -eq 'UserMailbox'" | Set-Mailbox -RetainDeletedItemsFor "30" Configure mailbox plan deleted items retention Suppose you only want to set the retention period for all the user mailboxes. The above commands only apply to existing mailboxes. So if you create new user mailboxes, the default items retention period is set to the default 14 days. Note: The global configuration for the deleted items retention period is stored in the Mailbox Plans assigned to the mailboxes. PS C:\> Get-MailboxPlan | Set-MailboxPlan -RetainDeletedItemsFor "30" Run the Get-MailboxPlan cmdlet to check the retained deleted items for value. Note: The above change will only apply to new mailboxes. You still have to modify the deleted items retention period for existing mailboxes with the Set-Mailbox cmdlet, as shown in the first section. Read more: Permanently delete users from Office 365 » Conclusion You successfully did configure the mailbox plan to retain deleted items for 30 days. You learned how to change Exchange Online deleted items retention period with PowerShell.

#HOW TO PURGE ENTIRE FOLDERS FROM DELETED ITEMS RECOVERY HOW TO# First, change the mailbox retention period for a single mailbox or all mailboxes. I recommend setting the deleted retention items for all mailboxes.
