Find All Mailboxes with Mixed up Quota settings
Invariably, when you let your local admins create mailboxes using a web interface, you will get some odd settings.
One of things that I've noticed, when running PowerShelll queries, is all the mailboxes with incorrect quota settings. Users with Send Receive limits lower than the Notification settings. Tired of these alerts, I created the following to dump those mailboxes to a CSV.
Get
-Mailbox
-Filter "UseDatabaseQuotaDefaults -eq `$false" -ResultSize unlimited
| where {($_.prohibitsendquota
-lt $_.issuewarningquota
) -or ($_.prohibitsendquota
-gt $_.prohibitsendreceivequota
)} | select servername
,Displayname
,name
, issuewarningquota
, prohibitsendquota
, prohibitsendreceivequota
| Export-Csv -Path "C:\mbxs_with_bad_quotas.csv"
I am hoping that someone might be able to develop a better filter statement. When I tried to use:
-filter {prohibitsendquota -lt issuewarningquota}
it would always error out.
Get-Mailbox : Cannot bind parameter 'Filter' to the target. Exception setting "Filter": "Invalid filter syntax. For a description of the filter parameter syntax see the command help.
"prohibitsendquota -lt issuewarningquota" at position 23."
At line:1 char:20
+ Get-Mailbox -Filter <<<< "prohibitsendquota -lt issuewarningquota"
Now.. Send the CSV to my remote admins, and ask them to help out their users.
:)