Configuring Deleted Items Retention Periods in Exchange Server 2007

Deleted items retention is configured by default in Exchange Server 2007 for both mailboxes and individual items within a mailbox. For mailboxes, the default setting is 30 days, and for mail items, the default setting is 14 days. The retention periods can be changed using the following Windows PowerShell commands in Exchange Management Shell:

Set-MailboxDatabase `
 -Identity "Mailbox Database" `
 -DeletedItemRetention 7.00:00:00
Set-MailboxDatabase `
 -Identity "Mailbox Database" `
 -MailboxRetention 7.00:00:00

Note that the backtick (`) at the end of a line indicates that the command continues on the next line; in Exchange Management Shell, you could enter the command all on one line without the backticks. The time period is set with the following format: days.hours.minutes.seconds. In the examples, 7.00:00:00 indicates a retention period of seven days.

The Deleted items retention period can also be set per user by entering the command

Set-Mailbox <account name> `
 -ItemRetention 7.00:00:00

where <account name> is the account name of the individual user.

By default, deleted items retention enables restore of only soft-deleted mail (i.e., mail deleted via the Deleted Items folder in an Outlook mailbox). If a hard delete is performed (by pressing the Shift key when deleting the mail item), the item doesn't enter the deleted items retention system. However, you can change this behavior by making a registry modification on client systems. In the HKLM\SOFTWARE\Microsoft\Exchange\Client\Options subkey, create a new DWORD value named DumpsterAlwaysOn and set its value to 1. Making this modification has the potential to increase your Exchange storage requirements significantly if you keep deleted items for a long period of time.

After making the registry change, you'll be able to highlight any folder in Outlook and choose Tools, Recover Deleted Items to bring up the Recover Deleted Items window. Click the envelope icon to restore the item to the mailbox folder from which it was deleted.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering SharePoint 2013: Succeeding, Not Just Surviving

Building on the success of the “Mastering SharePoint 2010” seminars, the presenters have updated the content to cover the latest and greatest SharePoint product: SharePoint 2013. While SharePoint 2013 is relatively new on the marketplace, the presenters have been working with SharePoint 2013 for well over a year, and have implemented it with a number of clients in production environments.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.