Mailbox Statistics report with Email addresses

Script to collect and export the mailbox properties from Get-Mailbox and Get-MailboxStatistics cmdlets to a CSV file

This script can be extended based on the required attributes

Get-Mailbox -ResultSize Unlimited  | 
Select-Object DisplayName, 
@{label="ItemCount";expression={(Get-MailboxStatistics $_).ItemCount}},
@{label="TotalItemSize";expression={(Get-MailboxStatistics $_).TotalItemSize}},  
@{label="DeletedItemCount";expression={(Get-MailboxStatistics $_).DeletedItemCount}},
@{label="TotalDeletedItemSize";expression={(Get-MailboxStatistics $_).TotalDeletedItemSize}},
@{label="MailboxGuid";expression={(Get-MailboxStatistics $_).MailboxGuid}},
@{label="LastLogoffTime";expression={(Get-MailboxStatistics $_).LastLogoffTime}}, 
@{label="LastLogonTime";expression={(Get-MailboxStatistics $_).LastLogonTime}},IssueWarningQuota, ProhibitSendQuota 
 Export-Csv "Path to the output file " -NoTypeInformation
This entry was posted in Exchange, PowerShell and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s