Hello, @MKHULEKO THABISO NHLAMBO,
Welcome to the Microsoft Q&A platform!
To generate a report for all Exchange mailbox archives with used and available space for all users, you can use PowerShell.
Here’s a script that can help you get started:
# Connect to Exchange Online
Connect-ExchangeOnline
# Get mailbox archive statistics
$Mailboxes = Get-Mailbox -Archive | Get-MailboxStatistics
# Create a report
$Report = @()
foreach ($Mailbox in $Mailboxes) {
$Report += [PSCustomObject]@{
User = $Mailbox.DisplayName
ArchiveUsedSpace = [math]::round($Mailbox.TotalItemSize.Value.ToMB(), 2)
ArchiveAvailableSpace = [math]::round(($Mailbox.StorageLimitStatus - $Mailbox.TotalItemSize.Value.ToMB()), 2)
}
}
# Export the report to a CSV file, replace "C:\MailboxArchiveReport.csv" with your csv location
$Report | Export-Csv -Path "C:\MailboxArchiveReport.csv" -NoTypeInformation
Test Results:
This script will:
- Connect to Exchange Online.
- Retrieve mailbox archive statistics.
- Create a report with the user's display name, used archive space, and available archive space.
- Export the report to a CSV file.
Make sure you have the necessary permissions to run these commands and that the Exchange Online PowerShell module is installed. Should you need more help on this, you can feel free to post back.
If the answer is helpful, please click on “Accept answer” as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.
Thank you for your support and understanding.
Best Wishes,
Alex Zhang