Sometimes you need to archive user emails on exchange online when user doesn`t have enough space on mailbox. After assign the retention policy on user mailbox. Use the following commands on your powershell to initiate the operation manually. First install exchange online powershell module on your computer.
Install-Module -Name ExchangeOnlineManagement
After installation the exo ps module, log in your tenant using the following commands.
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName [email protected] -ShowProgress $true
If you successfully logged on your tenant using exo ps. You can initiate the migration from user’s mailbox to user’s archive using the following commands.
Set-Mailbox '[email protected]' -RetentionHoldEnabled $false
Start-ManagedFolderAssistant '[email protected]'
Then use the following command to see the changes on user’s mailbox.
Get-MailboxStatistics -Identity "[email protected]" -Archive | Select DisplayName, TotalItemSize, ItemCount
Thanks for reading, and have a good day.
Hasan