The following article explains how we can get mail box size of particular user or all users from Microsoft Exchange Server 2010 using PowerShell commands. In previous versions of Exchange, we could view the mail box size from the Exchange console. Microsoft has added a new, powerful command line shell called PowerShell which was developed for System administrators to easily configure and maintain Windows.
The following command lines can be used to retrieve user mailbox size so that administrators can monitor the size of the mailbox.
To get specific user's mailbox size: 'Get-MailboxStatistics -Identity "domain\username"
To format the result of the previous command by using Display name, Total Size, Total Item Count, Storage Limist Status use the command: 'Get-MailboxStatistics -Identity "domain\username" |ft DisplayName, TotaltemSize, ItemCount, StorageLimitStatus'
To Get details of the Database in your Exchange Server: 'Get-MailboxStatisticsDatabse'
To Get mailbox size of all users in a database:
'Get-MailboxStatistics -Database "databasename"'
Format the result:
'Get-MailboxStatistics -Database "databasename" |ft DisplayName, TotaltemSize, StorageLimitStatus'
There are so much more we can do with PowerShell! To get help on any commands in PowerShell, simply type 'Get-Help <cmdlet name>'
For e.g. 'Get-Help Get -MailboxStatistics'