hi everyone. been struggling with this for way too long now. i simply need
to write a script that will take an AD account name as input, and report on
2 things for that user: Exchange mailbox size limit, and current mailbox
size.

Bharat, an MVP in here got me a good start a few days ago but im still
struggling. i guess what im looking for is an example... i cant figure out
how to determine limit if the limit is imposed by a policy in exchange.
supposedly there are attributes called msExchangePolicyList and
msExchangePolicyListBL that i should be looking at, but i dont even know
where they exist... theyre certainly not part of an AD user object. so
again... i think you all for pointing me in the right direction but if some
could show me a quick example of what i need to do i would GREATLY
appreciate it!

thank you

Re: need to query AD and Exchange attributes by Bharat

Bharat
Fri Dec 15 14:14:53 CST 2006

Hi Troy,

Reposting [LONG] previous response with additional comments starting with
***.

- From the Mailbox Store, check the following attributes:
mDBStorageQuota
mDBOverQuotaLimit
mDBOverHardQuotaLimit

This will get you the limits if implemented on the Mailbox Store.

***(I would do this for all Mailbox Store objects in my Exchange Org at the
beginning of my script)

- If limits are applied by a System Policy: check the "msExchPolicyList"
attribute of the Mailbox Store. This has the distinguishedName of the System
Policy that applies to that Store. These are stores in the "Policies"
container in the Administrative Group.
e.g.
CN=MyMailboxQuotaPolicyName,CN=Policies,CN=First Administrative Group,
CN=Administrative Groups, CN=MyExchangeOrg,CN=Microsoft
Exchange,CN=Services,CN=Configuration,DC=MyDomain,DC=com

***(Do this in the beginning as well. With the Store limits and Policy - if
any applied to each Store - limits stored in variables/dictionary object.
Note, the Dictionary object can have key-value pairs that can store
information for later retrieval. Alternatively, you can store these in
variables.)


- The "msExchPolicyListBL" has distinguishedName(s) of the Mailbox Stores to
which the policy is applied - if you want to cross-check.
The objectClass for the policy is msExchPrivateMDBPolicy.
If any policies that apply to the user's Mailbox Store are found, you can
list the same attributes (as the user and the Mailbox Store) to get list of
limits applied by Policy:
mDBStorageQuota
mDBOverQuotaLimit
mDBOverHardQuotaLimit

---
To summarize, I would:
1) get list of all Mailbox Store(s) and their limits (***using each Store's
mDBStorageQuota, mDBOverQuotaLimit, and mDBOverHardQuotaLimit values)

2) get list of all policies (objectClass=msExchPrivateMDBPolicy), the Stores
that they apply to (msExchPolicyListBL), and the Policy limits (***the
Policy's mDBStorageQuota, mDBQuotaLimit, and mDBOverHardQuotaLimit
attributes), then

*Get the above 2 as the first thing in your script before you enumerate
users, store them in variables/dictionary

3) get user, check limits (***user's mDBStorageQuota, mDBOverQuotaLimit, and
mDBOverHardQuotaLimit)
***4) - if user's individual limits exist then output those without
checking/comparing policy,
5) if not (user doesn't have limits) - go to Store - check if Policy
applies -> if
yes, output the Policy limits (***you fetched those earlier and stored in
variables/Dictionary object)
***6), -> if not (no Policy applies), check Store limits and see if limits
exist -> if yes, output those.

***Once again, by doing the above you're making the script a lot more
complicated. As noted below, it's far easier to simply output exceptions to
the Policy/Store limits setup on individual user accounts because you
already know the Store/Policy limits.

When I wrote the script I linked to in earlier post, it was simply easier to
just list the exceptions (when individual limits are set, bypassing Store
limits).

***Depending on *availability of time*, I may modify the above script to
actually check Store and Policy limits as well over the next few days.
--
Bharat Suneja
MVP - Exchange
www.zenprise.com
NEW blog location:
www.exchangepedia.com/blog
----------------------------------------------



"Troy McClure" <nun@4u.com> wrote in message
news:ebCtoGIIHHA.3468@TK2MSFTNGP04.phx.gbl...
> hi everyone. been struggling with this for way too long now. i simply need
> to write a script that will take an AD account name as input, and report
> on 2 things for that user: Exchange mailbox size limit, and current
> mailbox size.
>
> Bharat, an MVP in here got me a good start a few days ago but im still
> struggling. i guess what im looking for is an example... i cant figure out
> how to determine limit if the limit is imposed by a policy in exchange.
> supposedly there are attributes called msExchangePolicyList and
> msExchangePolicyListBL that i should be looking at, but i dont even know
> where they exist... theyre certainly not part of an AD user object. so
> again... i think you all for pointing me in the right direction but if
> some could show me a quick example of what i need to do i would GREATLY
> appreciate it!
>
> thank you
>



Re: need to query AD and Exchange attributes by Mark

Mark
Fri Dec 15 14:12:35 CST 2006

Not sure if this is a typo by you but where you have typed "Exchange"
should just be "Exch".
Search again without "ange" and you'll see them.



Re: need to query AD and Exchange attributes by Bharat

Bharat
Fri Dec 15 14:17:47 CST 2006

Great catch... ! :)

--
Bharat Suneja
MVP - Exchange
www.zenprise.com
NEW blog location:
www.exchangepedia.com/blog
----------------------------------------------



"Mark Arnold [MVP]" <mark@mvps.org> wrote in message
news:tb06o25297fn5uopbba5btpkhbidokqimo@4ax.com...
> Not sure if this is a typo by you but where you have typed "Exchange"
> should just be "Exch".
> Search again without "ange" and you'll see them.
>
>



Re: need to query AD and Exchange attributes by Troy

Troy
Fri Dec 15 14:57:44 CST 2006

huh? not sure what you mean. i typed msExchPolicyList and this does not
exist on my user object in adsiedit...
am i missing something here??



"Mark Arnold [MVP]" <mark@mvps.org> wrote in message
news:tb06o25297fn5uopbba5btpkhbidokqimo@4ax.com...
> Not sure if this is a typo by you but where you have typed "Exchange"
> should just be "Exch".
> Search again without "ange" and you'll see them.
>
>


Re: need to query AD and Exchange attributes by Bharat

Bharat
Fri Dec 15 15:32:43 CST 2006

That's an attribute of the Store (objectClass=msExchPrivateMDB).

So you need to get all instances of that object in your *Configuration*
container (to narrow it down, under CN=YourOrganization,CN=Microsoft
Exchange,CN=Services,CN=Configuration,DC=yourDomain,DC=com (or whatever your
domain extension is).

Then query the Store(s) for msExchPolicyList if a policy exists.
If it does, query the policy's limits - if those exist.

It begins to get complicated... will be a *long* script. :)
--
Bharat Suneja
MVP - Exchange
www.zenprise.com
NEW blog location:
www.exchangepedia.com/blog
----------------------------------------------



"Troy McClure" <nun@4u.com> wrote in message
news:OszUsuIIHHA.1008@TK2MSFTNGP06.phx.gbl...
> huh? not sure what you mean. i typed msExchPolicyList and this does not
> exist on my user object in adsiedit...
> am i missing something here??
>
>
>
> "Mark Arnold [MVP]" <mark@mvps.org> wrote in message
> news:tb06o25297fn5uopbba5btpkhbidokqimo@4ax.com...
>> Not sure if this is a typo by you but where you have typed "Exchange"
>> should just be "Exch".
>> Search again without "ange" and you'll see them.
>>
>>
>



Re: need to query AD and Exchange attributes by Mark

Mark
Sat Dec 16 12:47:06 CST 2006

Your post used the word "Exchange" in the attribute when in actual
fact the word is "Exch"
See the other posts by BS.