This Powershell script allows you to easily generate the latest Exchange report that consists of the following information:
- Display Name
- Database
- Issue Warning Quote
- Prohibit Send Quota
- Prohibit Send Receive Quota
- Total Item Size
- Item Count
- Storage Limit Status
$AllMailboxes = @()
$Mailboxes = Get-Mailbox -ResultSize Unlimited | Select DisplayName, Database, IssueWarningQuota, ProhibitSendQuota, ProhibitSendReceiveQuota, Alias
foreach ($Mailbox in $Mailboxes){
$MailboxStats = "" |Select DisplayName,Database,IssueWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota,TotalItemSize,ItemCount,StorageLimitStatus
$Stats = Get-MailboxStatistics -Identity $Mailbox.Alias
$MailboxStats.DisplayName = $Mailbox.DisplayName
$MailboxStats.Database = $Mailbox.Database
$MailboxStats.IssueWarningQuota = $Mailbox.IssueWarningQuota
$MailboxStats.ProhibitSendQuota =$Mailbox.ProhibitSendQuota
$MailboxStats.ProhibitSendReceiveQuota =$Mailbox.ProhibitSendReceiveQuota
$MailboxStats.TotalItemSize = $Stats.TotalItemSize
$MailboxStats.ItemCount = $Stats.ItemCount
$MailboxStats.StorageLimitStatus = $Stats.StorageLimitStatus
$AllMailboxes += $MailboxStats
}
$AllMailboxes | Export-Csv C:\mailboxsizes.csv -NoTypeInformation
This comment has been removed by the author.
ReplyDelete