Need a simple PS script (Exchange 2010) to list the following in column form on screen, and even with google can’t sort this out and losing self esteem. Yeah, embarrassing. Assumes all users and databases parsed on the server it’s run (if possible).
displayname TotalItemSize(MB) IssueWarningQuota(MB) ProhibitSendQuota(MB)
I don’t want any information other than above. This way I can sort users and make my own determination as to who is close / over the limit regardless if they have been sent a warning already (unreliable) or their mailbox isn’t using defaults. Is this even possible?
The problem I’m running into is (I think) trying to combine ‘get- mailbox’ and ‘get- mailboxstatistics’ ??
1 Spice up
Get-Mailbox | Get-MailboxStatistics | Select DisplayName,TotalItemSize,DatabaseIssueWarningQuota,DatabaseProhibitSendQuota | format-table
davidr4
(davidr4)
3
You just need to add the server name or change to database if that is what you want.
Edit: Here it is with all fields formatted to MB
Get-Mailbox -server 'server name' | Select-Object displayname,@{n="TotalItemSize(MB)";e = {$MBXstat = Get-MailboxStatistics $_; $MBXstat.totalItemsize.value.toMB()}},@{Name='IssueWarningQuota (MB)'; expression= { $_.IssueWarningQuota.value.toMB()}},@{Name='ProhibitSendQuota (MB)'; expression= {$_.ProhibitSendQuota.value.toMB()}}
Most excellent - would have never figured the ‘database’ prefix.
David - your script returns mostly blank fields in the two quota columns. I’m assuming it’s because their quota is still at the database default?
davidr4
(davidr4)
5
KNPA’s didn’t work for me, but mine did. Not sure if it works for you