How to create and apply retention policies and check Archive mailbox Size.

In the previous Article, we explained what is online Archive and how to enable it. In this article we will understand how to move data to Online Archive and how to check size of Online Archive.

Once you have Online Archive enabled, you can assign a retention policy to the mailbox to move data to Archive.

Retention Policies are made up of Retention Policy Tags, which defines how long to keep the email in your mailbox before moving it to Archive or Deleting the email.

There are some default “Retention Polices” available and you can also create one as per your need.
To see the default retention policies
Login – Exchange Admin Center -> Compliance Management – Retention Policies.

Default Retention Policies

You can also run below command on Exchange Online PowerShell to view Retention Policies and Tags.


If the default policy doesn’t suit your need, you can create a new one.

Create Retention Policy Tag –

New-RetentionPolicyTag "3 Year Move To Archive" -Type All -RetentionEnabled $true -AgeLimitForRetention 1095 -RetentionAction MoveToArchive

Create Retention Policy –

New-RetentionPolicy "3 Year Move To Archive - Policy" -RetentionPolicyTagLinks "3 Year Move To Archive"

Apply policy to a user –

Set-Mailbox -Identity -RetentionPolicy "3 Year Move To Archive - Policy"

Once the policy is applied to the user you can Start Managed Folder Assistant on the user’s mailbox to start Archive.

Once this is done, you can check the Archive size to see if the policy is working.

Get-MailboxStatistics -Archive

Exchange Online finds the archive mailbox using ArchiveGUID. Once Archive is enabled, you can see this GUID in mailbox properties.

The auto-expanding archive replaces the single GUID that connects the mailbox to the archive with a linked list of GUIDs. Each of the GUIDs points to a separate auxiliary archive of up to 50 GB.

We can see the GUID details using below command –

Get-ExoMailbox –Identity -Properties MailboxLocations | Select -ExpandProperty MailboxLocations

We can get GUID of the mailbox using below commands –

Get-MailboxLocation -User | Sort MailboxLocationType -Descending | FT MailboxGUID, MailboxLocationType

Once we have GUID we can find the mailbox size.

Get-ExoMailboxStatistics -Identity 2f2a0b11-1220-456e-bde6-8cbdca3fe17b | FT ItemCount, TotalItemSize

One comment

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s