Script to enable mailbox quota for specific smtp domain users
Hi,we are having multiple accepted domains in exchange 2007 SP1 . I have to implement a quota policy on some specific users having a particular smtp address and these users are having mailboxes in different mailbox stores.I am unable to locate any such script anywhere through which i can enable the quota policy on the basis of primary smtp address , kindly suggest if it is possible to do so & how.Thanks in advance.RegardsSupreet Singh
March 8th, 2010 9:10pm

Hi, Try this: get-mailbox -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -ProhibitSendReceiveQuota 5GB similarly you can set -ProhibitSendQuota , IssueWarningQuota etc. Regards, Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2010 9:13pm

Many thanks Laeeq,I will check it and revert.RegardsSupreet Singh
March 8th, 2010 9:24pm

there is small typo in Laeeq's command it should be get-mailbox -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -ProhibitSendReceiveQuota 5GB It is also safer to add the -ResultSize Unlimited so it becomes get-mailbox -ResultSize Unlimited -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -ProhibitSendReceiveQuota 5GB Full time IT consultant since 1998 mainly on Exchange\ISA\AD MCSE NT4.0,2000/2003, CCNA MCITP: Enterprise Messaging Administrator 2007/2010 MCT since 2001
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2010 9:34pm

Hi,I tried this script, it is running with partial success.I tried it in my testlab first having a few users, i tried this script - "get-mailbox -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -IssueWarningQuota 1GB -ProhibitSendQuota 2GB"It is getting applied but if on the user mailbox properties the option " Use mailbox database defaults" is selected then it enables the new quota settings but did'nt disable the default settings, as a result of this the new quota setting is showing as greyed-out.I also checked it on few more users whose "Use mailbox database defaults" option is unchecked. And it worked fine on these users.Need to add some more options in the script to disable the default quota settings as well.I also want to know is there any way to revert it back, if i want to remove the quota policy.Kindly help.RegardsSupreet Singh
March 9th, 2010 12:20am

Hi,I tried this script, it is running with partial success.I tried it in my testlab first having a few users, i tried this script - "get-mailbox -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -IssueWarningQuota 1GB -ProhibitSendQuota 2GB"It is getting applied but if on the user mailbox properties the option " Use mailbox database defaults" is selected then it enables the new quota settings but did'nt disable the default settings, as a result of this the new quota setting is showing as greyed-out.I also checked it on few more users whose "Use mailbox database defaults" option is unchecked. And it worked fine on these users.Need to add some more options in the script to disable the default quota settings as well.I also want to know is there any way to revert it back, if i want to remove the quota policy.Kindly help.RegardsSupreet Singh Try -UseDatabaseQuotaDefaults $false with other values like get-mailbox -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -IssueWarningQuota 1GB -ProhibitSendQuota 2GB" -UseDatabaseQuotaDefaults $false Regards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
March 9th, 2010 12:27am

Thanks Laeeq Qazi,It worked for me, let me know one more thing, is there a way to revert it back if required or any script to remove prohibitsendquota.RegardsSupreet Singh
March 9th, 2010 12:59am

Hi, Yes these quotas can be reverted any time. You can run this for all domain mailboxes get-mailbox -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -UseDatabaseQuotaDefaults $true or for an individual mailbox set-mailbox user@domain.com -UseDatabaseQuotaDefaults $true It will set the mailbox to use Storage Quota settings of the Mailbox Database where this mailbox exists. Also If you set any of the value to unlimited then that value will not be checked for storage limits. you can set ProhibitSendQuota to Unlimited like this get-mailbox -filter{EmailAddresses -like '*@domain.com'}|set-mailbox -UseDatabaseQuotaDefaults $false -ProhibitSendQuota Unlimited If you set these values specifically using set-mailbox commands and UseDatabaseQuotaDefaults to false then Database Quotas are not applied. Have a look into this article to understand "How to Configure Storage Quotas for a Mailbox Database" http://technet.microsoft.com/en-us/library/bb201753(EXCHG.80).aspx Regards, Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
March 9th, 2010 1:13am

http://blog.meigh.eu/2010/03/01/managing-mailbox-quotas-through-group-membership.aspx
March 9th, 2010 1:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics