Pages

15 October 2019

How to set default retention policy for all existing and new users in Exchange Online - Set default retention policy for On-Premises users

In Exchange Online you can set a retention policy as the default for everyone within the tenant.
In Exchange On-Premises this isn't possible, therefore you have to set them every once in a while.

For Exchange Online:

To view all your retention policies:
Get-RetentionPolicy

The set the one you want as the default:
Set-RetentionPolicy "Company - Default Policy" -IsDefault:$true

For Exchange On-Premises:

To view all your retention policies:
Get-RetentionPolicy

To set the one you want as default for all existing users:
Get-Mailbox -Resultsize Unlimited | Set-Mailbox -RetentionPolicy "Company - Default Policy"

To check what the current retention policy is:
Get-Mailbox -ResultSize Unlimited | Select Retentionpolicy,Name

2 comments:

  1. how do you set default policy for on-prem without affecting existing users?

    ReplyDelete
    Replies
    1. Anonymous3/5/22 20:17

      Get-Mailbox -Resultsize unlimited | WHERE {$_.Retentionpolicy -eq $null} | Set-Mailbox -RetentionPolicy "POLICYNAME"

      Delete