[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1778
  • Last Modified:

Office 365 (Exchange) Change Default RetainDeletedItemsFor

I would like to change the deleted items retention period (the amount of time a person can recover a deleted item) from the default 14 days to the maximum of 30 days. I am aware I can do this via a PowerShell command per existing mailbox but would like to set the default value so every subsequent mailbox that is created would inherit the 30 days setting.

TIA,
- Brian
0
b_stockton
Asked:
b_stockton
  • 2
  • 2
2 Solutions
 
Vasil Michev (MVP)Commented:
Two things here:

1) The amount of time item is stored in the 'recycle bin', controlled by the "Deleted items" tag
2) The amount of time items are stored in the "Recover deleted items" container, controlled by the "Recovarable Items" tag

For the first one, Just create a new retention tag/policy and apply it as default. For the second one, you use the Set-mailbox cmdlet. If you are using a script to provision new mailboxes, just add this as additional action. If not, you can run this on a schedule:

Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox| ? RetainDeletedItemsFor -le "14.00:00:00" | Set-Mailbox -RetainDeletedItemsFor 30

Open in new window

0
 
ontechCommented:
Set-Mailbox -RetainDeletedItemsFor 30

You can run this command and this cannot be set to domain level.
You will have to manually change the settings for all users.
0
 
b_stocktonAuthor Commented:
That's too bad but it is what I was afraid of. It would be nice to have their settings pre-configured so a non-sysadmin could setup accounts. <shrug>

Thanks.
0
 
Vasil Michev (MVP)Commented:
You can grant permissions to certain people to run this command, RBAC gives you a lot of flexibility.
0
 
b_stocktonAuthor Commented:
I'm going to split the points but didn't really get what I was wanting. I do understand the feature I want/need, making the "-RetainDeletedItemsFor 30" command a system-wide default, is not available on the service. :(

Thanks
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now