List all online archives and their total size in PowerShell
Ever wondered how much space individual online archives were occupying? Me too, so I decided to generate a list using the Get-MailboxStatistics PowerShell command. Here is the command I used to obtain the details and format the table to list the results in size order:
Get-Mailbox | Get-MailboxStatistics -Archive -ErrorAction SilentlyContinue | Sort-Object TotalItemSize | FT DisplayName,ItemCount,TotalItemSize
Note: the online archives are stored within the user mailbox and not in a separate folder or database.
Also, if they want to export this information to a csv file, they can swap “FT” with “Select-Object” and add a ” | export-csv c:\pathtofile\file.csv”