Conflicting Mailbox Store Policies

by Bharat Suneja

I spent some time (ok, I’ll admit – more than “some time”… ) writing a script to get user mailbox storage limits/quotas [an improvement on the script I posted earlier – read previous post “SCRIPT: Show mailbox limits“]. The new script checks users’ individual mailbox limits (if these are set in user properties in ADUC). If no individual limits exist, it checks the limits on user’s mailbox Store, and also checks if any System Policies apply mailbox storage limits to the Store. If any policies are found, it checks the limits on those as well, and reports on what the user’s actual limits are. Something like the Resultant Set of Policies feature/snap-in for Group Policies, for user’s mailbox storage quotas.

Out of curiosity (and in an attempt to see if the script breaks), I tried to apply multiple Mailbox Store policies that apply storage limits to the same Store. Almost certain that Exchange System Manager will do no validation if an existing Mailbox Policy is already applied, I was pleasantly surprised to find that it in fact does validate!

When trying to apply a second Mailbox Store policy (with storage limits) to a Mailbox Store that already has such a policy applied, ESM throws up the following error:

At this point, the easy choice is to click on the “Yes” button, but I was still hoping if I selected No the second conflicting policy may be applied :)

No such luck – ESM curtly informs you that the second policy could not be applied “… because you refused to remove the object from the control of conflicting policies.

I can’t help but think about all the thought that goes into creating such software – though we all have our own pet peeves and can count the things we don’t like about Exchange, for a change it’s great to be able to appreciate the things you do like about it. Having worked on a couple of cool software features in Zenprise (stuff I’d love to talk and blog about soon!), I have a new-found appreciation for such thoughtfulness and attention to detail.

This certainly helps me avoid writing another few hundred lines of code to figure out if multiple System Policies for mailbox quotas are applied to a Store, which one has priority and how to make the script figure that out.

As a sidenote, writing a script using VBScript to accomplish something in an Exchange Server 2003/2000 environment seems like a real pain now – given what I accomplished in about 300 lines of code tonight is so easily accomplished using a one-liner in Exchange (2007) shell, and something I do several times a day! (At times just because it’s so easy to do, without writing any code! :)

The Exchange shell equivalents:
Get-mailbox | select name,database,*quota*
and
Get-MailboxStatics

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: