The strategies in this post help you to move emails effectively to cloud archive mailbox.
Archive mailbox allows for additional storage of users’ email messages. However, in some scenarios, emails not moving to archive in Microsoft 365. This is because of various reasons.
Let’s dive right into our findings.
In a hybrid environment, check the status of the archive mailbox where the user account is synced from on-premises and the archive mailbox exists in Microsoft 365. You should use both of the following properties to confirm the status of the archive in on-premises and cloud.
Run the following cmdlet in on-premises PowerShell:
Get-RemoteMailbox UserName | FL ArchiveGuid,DisabledArchiveGuid
Run the following cmdlet in Exchange Online PowerShell:
Get-Mailbox UserName | FL ArchiveGuid,DisabledArchiveGuid
The output of above commands should be the same. If they are not match, correct it. In my case, both are same.
- I have applied the retention policy of 2 years in Microsoft 365. This will move emails older than 2 years from the user mailbox to the cloud archive mailbox.
- To verify that you have applied the retention policy, run the following cmdlet in Microsoft 365 to retrieve the retention policy for the mailbox.
Get-Mailbox UserName | FL RetentionPolicy
To apply a retention policy to a single mailbox using the portal:
- Go to Recipients > Mailboxes.
- In the list view, select the mailbox to which you want to apply the retention policy, and then click Edit.
- In User Mailbox, click Mailbox features.
- In the Retention policy list, select the policy you want to apply to the mailbox, and then click Save.
To apply a retention policy to a single mailbox using the PowerShell:
Set-Mailbox UserName -RetentionPolicy “PolicyName”
Emails not moving to archive mailbox
- After you create the retention policy, the policy doesn’t automatically run. However, you can manually run the below cmdlet every time that you want to move messages to the archive.
Start-ManagedFolderAssistant –Identity <UserName>
- The Managed Folder Assistant uses the retention policy settings of users’ mailboxes to process retention of items. This mailbox processing occurs automatically. You can use the Start-ManagedFolderAssistant cmdlet to immediately start processing the specified mailbox.
- You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they’re not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.
- If you get an issue where the invocation of the managed folder assistance was failing with a generic RPC error. “The call to Mailbox Assistance Service on server: ‘NAME’ failed. Error from RPC is –2147220989”.
- When this error is encountered subsequent retries of the same command can be successful. The error can sometimes occur as portions of mailboxes are being initialized within the service. For example – if a secondary archive is being provisioned off a main archive. As a potential workaround to this issue the primary mailbox GUID can be specified in the start-ManagedFolderAssistant command.
Get-Mailbox UserName | FL ExchangeGUID
- Using this mailbox GUID we can invoke the managed folder assistance.
- When utilizing the GUID we can minimize the change that any initialization process does not cause the command to fail.
- After executed the Managed Folder Assistant, emails will be moved from the primary mailbox to the cloud archive mailbox. It will take minimum one day to process. In some cases, it may take longer than 24 hours to move emails.
The MRM (Messaging Records Management) is slow process and it takes it’s own time to process mailbox. However you can use the below command to trigger the MRM often. You can modify the seconds that you wish. In my case, I set it to 30 minutes.
write-host “waiting”; start-sleep -seconds 1800;
How to check email movement status?
- This cmdlet is really intended to validate that all is well within a mailbox but it does return some interesting information about MFA, grouped together with an Elc* (email lifecycle) prefix. You generate a mailbox diagnostics log for a specific user as follows.
Export-MailboxDiagnosticLogs –Identity UserName -ExtendedProperties
- You can find the following fields in the output.
|ElcLastRunTotalProcessingTime||The total time (in milliseconds) that the Managed Folder Assistant spent processing the mailbox in its last run.|
|ElcLastRunSubAssistantProcessingTime||The total time (in milliseconds) that the ELCTagSubAssistant (the part of MFA that handles item tagging and expiration). Only time spent processing items in the IPM folder tree is calculated. Time spent processing items in the Recoverable Items folder structure (dumpster) is ignored.|
|ElcLastRunUpdatedFolderCount||The number of folders that were updated by MFA in its last run.|
|ElcLastRunTaggedFolderCount||The number of folders tagged (or untagged) by MFA in its last run.|
|ElcLastRunUpdatedItemCount||The number of individual items that were tagged (or untagged) by MFA in its last run.|
|ElcLastRunTaggedWithArchiveItemCount||The number of items that MFA updated with an archive tag in its last run.|
|ElcLastRunTaggedWithExpiryItemCount||The number of items that MFA updated with an expiry (delete) tag in its last run.|
|ElcLastRunDeletedFromRootItemCount||The number of items MFA deleted from the IPM folder tree in its last run.|
|ElcLastRynDeletedFromDumpsterItemCount||The number of items MFA deleted from the Recoverable Items folder structure in its last run.|
|ElcLastRunArchivedFromDumpsterItemCount||The number of items MFA moved from the Recoverable Items folder structure to the archive mailbox in its last run.|
|ElcLastRunArchivedFromRootItemCount||The number of items MFA moved from the IPM folder tree into the archive mailbox in its last run.|
|ElcLastRunSuccessTimeStamp||The last time MFA successfully finished processing a mailbox.|
- Now that you have this, you can look through the properties to find values that would be helpful for determining the last pass of the managed folder assistant.
- The values we’re looking for is ElcLastSuccessTimeStamp. The ElcLastSuccessTimeStamp is only stamped once the managed folder assistant has run.
- For Exchange Online, the Managed Folder Assistant only processes mailboxes that are larger than 10mb.
- You can use the Exchange Online auto-expanding archiving feature to enable unlimited storage space for archive mailboxes.
- When auto-expanding archiving is turned on, additional storage space is automatically added to a user’s archive mailbox when it approaches the storage limit.
- The result is unlimited mailbox storage capacity. You can turn on auto-expanding archiving for everyone in your organization or just for specific users.
Before adding the auto-expanding:
After adding the auto-expanding:
- To verify that auto-expanding archiving is enabled for your organization, run the following command in Exchange Online PowerShell.
Get-OrganizationConfig | FL AutoExpandingArchiveEnabled
- A value of True indicates that auto-expanding archiving is enabled for the organization. To verify that auto-expanding archiving is enabled for a specific user, run the following command in Exchange Online PowerShell.
Get-Mailbox UserName | FL AutoExpandingArchiveEnabled
- If you would like to enable this feature per a mailbox you can use the following command:
Enable-Mailbox UserName -AutoExpandingArchive
Also Read: How to fix Office 365 Online Archive Pending status in an hybrid environment?
That’s how I fixed emails not moving to archive issue.
Now I’d like to hear from you:
Which finding from today’s report did you find most interesting? Or maybe you have a question about something that I covered.
Either way, I’d like to hear from you. So go ahead and leave a comment below.