In this article I have already described how the mailbox sizes and the send and receive limits can be written to a CSV file. Here is a slightly modified version that converts the values into MB so that they can be better evaluated:
„Name;LANID;Database;IssueWarningQuota;SendQuota;SendReceiveQuota;MailboxSize“ | set-content „postfaecher.csv“
$mbxlist = get-mailbox -resultsize unlimited
foreach ($mbx in $mbxlist)
{
$size = Get-MailboxStatistics $mbx | ForEach-Object {$_.TotalItemSize} | ForEach-Object {$_.Value}
[double]$sizeMB = $size / 1024 / 1024
$name = $mbx.Name
$lanid = $mbx.Alias
$mbdb = $mbx.Database
$IW = $mbx.IssueWarningQuota
$IW = $IW.value
[double]$IWMB = $IW / 1024 / 1024
$SQ = $mbx.ProhibitSendQuota
$SQ = $SQ.value
[double]$SQMB = $SQ / 1024 / 1024
$SRQ = $mbx.ProhibitSendReceiveQuota
$SRQ = $SRQ.value
[double]$SRQMB = $SRQ / 1024 / 1024
„$name;$lanid;$mbdb;$IWMB;$SQMB;$SRQMB;$sizeMB“ | add-content „postfaecher.csv“
write-host „$name $lanid $mbdb $IWMB $SQMB $SRQMB $sizeMB“
}