How to get mailbox size in exchange 2007 via PowerShell.
Very simple!
1. If you need to check mailbox size for individual use string bellow:
Get-MailboxStatistics username | ft DisplayName, TotalItemSize, ItemCount
******for more information use get-help Get-MailboxStatistics -full******
2. If you need to get mailbox size for all user use next command:
Get-MailboxStatistics | ft DisplayName, TotalItemSize, ItemCount
******To export output to the file, add > c:\mailboxsize.txt******
FOR EXAMPLE: Get-MailboxStatistics | ft DisplayName, TotalItemSize, ItemCount > c:\mailboxsize.txt
To view more friendly output you can try to use my string:
:)
Very simple!
1. If you need to check mailbox size for individual use string bellow:
Get-MailboxStatistics username | ft DisplayName, TotalItemSize, ItemCount
******for more information use get-help Get-MailboxStatistics -full******
2. If you need to get mailbox size for all user use next command:
Get-MailboxStatistics | ft DisplayName, TotalItemSize, ItemCount
******To export output to the file, add > c:\mailboxsize.txt******
FOR EXAMPLE: Get-MailboxStatistics | ft DisplayName, TotalItemSize, ItemCount > c:\mailboxsize.txt
To view more friendly output you can try to use my string:
Get-MailboxStatistics | Sort-Object TotalItemSize
-Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression =
{$_.TotalItemSize.Value.ToMB()}},ItemCount > c:\mailboxsize.txt
:)
******If the command is not working run this before:******
add-pssnapin
Microsoft.Exchange.Management.PowerShell.Admin