Currently I'm using this powershell command on the server in the Exchange Management Shell:
Get-MailboxStatistics username | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage Limit”;expression={$_.StorageLimitStatus}} -auto
My ultimite goal is to be able to run this from my desktop to query the server remotely. I would also be helpful to be able to query for more then one user (but not all users) and it would also be great if the script could pull the default quota size for the DB that the mailbox sits on.
Right now I have to log into the server, run the Exchange Management Shell and then cut and paste the code. It takes just as long to go into the GUI :-(
my results look like this:
User Total Size (MB) Items Storage Limit
Lastname, First(Domain) 10 992 BelowLimit
I'd like it to look like this:
User Total Size (MB) Items Storage Limit Default Limit
Lastname, First(Domain) 10 992 BelowLimit 80MB
Lastname, First(Domain) 15 165 100MB 80MB