daknetworks.com

You are here: Blog Exchange Retention | RetainDeletedItemsFor

Exchange Retention | RetainDeletedItemsFor

PHONE: Riiiiinnnnnngggg!!!! Riiiiinnnnnngggg!!!! Riiiiinnnnnngggg!!!!

ME: Hello

THEM: Yes, in Outlook, when I go my Deleted Items and click "Recover Deleted Items from Server" it only goes back 2 weeks.

Retention

Retention is how long something can be retrieved if it is deleted. By default, this is 14 days. This can be found with the RetainDeletedItemsFor value, like this:

get-mailbox foo.user |select RetainDeletedItemsFor

Now, there is also a retention on the MailboxDatabase (EDB) that covers all mailboxes on the EDB. This setting is the DeletedItemRetention value, like this:

Get-MailboxDatabase "mailbox.database.name" |select DeletedItemRetention

Setting

Note that Mailboxes will automatically get their settings from the Mailboxdatabase. To set custom settings, you must first disable using the Mailboxdatabase defaults, like this:

set-mailbox foo.user -UseDatabaseRetentionDefaults $false

Next, setting retention is like this:

set-mailbox foo.user -RetainDeletedItemsFor 30

Note that if you run this command while using the mailboxdatabase defaults, the setting will stay at the default value of 14.

Or in one command:

set-mailbox foo.user -UseDatabaseRetentionDefaults $False -RetainDeletedItemsFor 30

Contact Dak Networks

We are not taking on new clients at this time.