How to check Shared Mailboxes size.

To check a shared mailboxes size in PowerShell, you can use the below cmdlet. Copy and paste the command in PowerShell

#To check Shared mailbox size

$SMbx = Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited

$Report = @()

ForEach ($S in $SMbx) {

$Stat = (Get-MailboxStatistics -Identity $S.Alias | Select ItemCount, TotalItemSize)

$ReportLine = [PSCustomObject][Ordered]@{

Mailbox     = $S.DisplayName

TotalItems  = $Stat.ItemCount

MailboxSize = $Stat.TotalItemSize

Quota       = $S.ProhibitSendReceiveQuota

Licensed    = $S.SkuAssigned}

$Report += $ReportLine }

$Report | Format-Table Mailbox, TotalItems, MailboxSize, Quota, Licensed -AutoSize

 

Leave a Reply

Your email address will not be published.