Use the Get-MailboxStatistics cmdlet to return information about a mailbox, such as the size of the mailbox, the number of messages it contains, and the last time it was accessed. In addition, you can get the move history or a move report of a completed move request.
1. To be able to run the required PowerShell commands, we will need to activate the Windows PowerShell console using the option of – Run as administrator
2. Right-click on the Windows PowerShell icon and choose the menu – Run as administrator
3. We will need a PowerShell command that will provide the required permission for running PowerShell command
Set-ExecutionPolicy Unrestricted –force
4. Running the PowerShell set of command for connecting Exchange Online
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Verifying that the remote PowerShell connection was successfully completed
5. Run the PowerShell command that will generate the user's Archive report.
Get-Mailbox -ResultSize unlimited | Get-MailboxStatistics -Archive |select TotalItemSize,DisplayName | export-csv C:\Users\Documents\Archive.csv
On Mailbox servers only, you can use the Get-MailboxStatistics cmdlet without parameters. In this case, the cmdlet returns the statistics for all mailboxes on all databases on the local server.
The Get-MailboxStatistics cmdlet requires at least one of the following parameters to complete successfully: Server, Database or Identity.
You can use the Get-MailboxStatistics cmdlet to return detailed move history and a move report for completed move requests to troubleshoot a move request. To view the move history, you must pass this cmdlet as an object.
For any further queries, you can reach us by creating a new ticket at Foetron Support Portal or you can directly call us on our support helpline number +91-124-4506200