• 1. London, UK
  • 2. Sydney, Australia
  • 3. New York, NY
  • 4. Melbourne, Australia
  • 5. Bellevue, WA
  • 6. Paris, France
  • 7. Moscow, Russia
  • 8. Chicago, IL
  • 9. San Francisco, CA
  • 10. Amsterdam, Netherlands

Wednesday, October 26, 2005

 

SCRIPT: Show mailbox limits

Posted by Bharat Suneja at 1:41 AM
At times the user's mailbox limits are adjusted to bypass the limits set on a store or all stores by a policy. This is done by unchecking 1) "Use mailbox store defaults" in user's properties --> Exchange General --> Storage Limits.

New values can be added for 2) "Issue warning at (KB):", 3) "Prohibit send at (KB):", and 4) "Prohibit send and receive at (KB):" fields.

The corresponding attributes in AD are:
1. mDBUseDefaults
2. mDBStorageQuota
3. mDBOverQuotaLimit
4. mDBHardQuotaLimit

Unchecking number 1 and not adding any values to 2, 3 & 4 result in user having a mailbox with no limits.

Here's a script that lists all mailboxes that have their limits changed to bypass store defaults (mDBUseDefaults=FALSE), and lists the 3 attributes above if present. [zipped showMailboxLimits.vbs]

Usage:

showMailboxLimits.vbs /f:outputfilename.txt

adding a /s:y suppresses console output

Output produced is comma separated, can be opened in a spreadsheet.

Update:
1/17/2007: New script that shows mailbox quotas for all users, including those applied by the Store and any System Policies that may be applied to the Store:
" SCRIPT: Show mailbox quotas (including Store & Policy quotas)"

Labels: ,

15 Comments:

May 1, 2006 3:15 AM
Anonymous Anonymous said...

Need to create a script for work that lists the mailbox enabled users on an Exchange 2003 server - and also lists the mailbox storage limit, domain name and DLs that each user is a member of - I can do some of this with a WMI script but cannot do the whole of it. Can someone help?

 
June 1, 2006 11:48 PM
Anonymous Anonymous said...

KB to MB conversion should be /1024, not /1000 ;)

But script works perfect and was helpful.

 
July 31, 2006 1:46 AM
Anonymous Anonymous said...

http://www.suneja.com/blog/stuff/showmailboxlimits.zip is not accessible anymore...

 
August 3, 2006 9:45 AM
Anonymous Jamie said...

Very helpful - works great! Thanks!

 
August 25, 2006 1:04 AM
Anonymous Hans said...

See comment of Jamie!
Thanx

 
September 20, 2006 7:28 AM
Anonymous Anonymous said...

great script - !!:)

 
December 6, 2006 8:29 AM
Anonymous Marcelo Moraes said...

Very Good, I'd made a change to enable you to generate the list by server and it's working well

Thanks

 
April 26, 2007 2:41 AM
Anonymous Anonymous said...

hello, how i can change the script to view the mailbox limits from a special OU under the rootDSE. Thanks for your Answer.
Lg, Mario.

 
April 28, 2007 7:48 AM
Blogger Bharat Suneja said...

Replace the following in line 43 under objCommand.CommandText:

"<" & strADPath & ">"

with:
"<LDAP://OU=YourOU,DC=Domain,DC=Com>"

(distinguishedName of the OU)

Bharat

 
May 24, 2007 5:45 AM
Anonymous Anonymous said...

Script is giving output of 1000 IDs only. How to get the output of all users in AD

 
May 24, 2007 9:02 AM
Blogger Bharat Suneja said...

This is the default behaviour of an ADODB query to ADSI. This can be modified by inserting the following:
objCommand.Properties("Page Size") = 20000

(*note, the above value of 20,000 can be changed to a value appropriate for your environment)

after the following statement:
objCommand.ActiveConnection = objConnection

so it looks like:
objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 20000

 
October 2, 2007 2:26 AM
Anonymous Anonymous said...

What a terrific piece of work!

Can anyone tell me if I can refine it to show the particular store the output'd users are in? I'm using a great many stores and it'd be grand to see this broken down per store.

Thanks :o)

 
October 23, 2007 5:00 PM
Anonymous Anonymous said...

Thanks very much for this script, did in 10 seconds what I would potentially have to click through each user to find out!

There's always a better way :)

 
April 20, 2008 9:24 PM
Anonymous Anonymous said...

How to show sending limit for each user

 
June 3, 2008 11:54 AM
Blogger depikson said...

This was a giant time saver. Thanks so much for this slick script!!!

 

Post a Comment

Links to this post:

Create a Link

<< Home