Enforce Retention Policies in Exchange and Office 365 via PowerShell

When creating and applying retention policies to mailboxes, either in Exchange or Office 365, we must force the application of the policy assigned to a mailbox or nothing will happen.

If we have mailboxes in an on premise Exchange server, the Exchange Management Shell must be used. When mailboxes are in Office 365, we must connect to the Office 365 tenant using the Azure AD PowerShell module.

While using the appropriate management tool, run the following command replacing “USER_ALIAS” with a valid mailbox alias (i.e. “johndoe”)…

Start-ManagedFolderAssistant –Identity “USER_ALIAS

After running the command for the individual target mailbox(es), wait about 30-60 minutes. If items are not removed from the inbox and/or do not show in the archive after 60 minutes, run the command again.

If you need to enforce policies for all mailboxes that have been assigned a retention policy, run this command…

Get-Mailbox -ResultSize Unlimited | Start-ManagedFolderAssistant

Either one of these commands must be run after assigning or reassigning retention policies for any mailbox.

Good luck and have fun!

 

Related Articles in this Blog:

 

Reference(s):

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s