Setting Exchange mailbox size limits on a group

WHAT! I hear you say, you can’t do that! .. Very true, but you can automate it ;-) using the wonders of Powershell

Exchange 200x

First you will need to use adsiedit.msc and get the groups distinguishedName.  Once you have that, using an account that has access to over the users AD objects you run this code:
$mygroup = “
$grp = [adsi](“

Now type:
$grp | FL *
This will list out properties of the group ** just to make sure its’ the right one **

What you can do here is type:
This will list the group membership.

Now choose a quota size in KB
$QuotaSize = 5242880

Then if you happy, run this code to set the quota size
forEach($xMem in $Grp.Member){Write-Host $xMem;$user = [adsi](“LDAP://$xMem“); $user.mDBUseDefaults = $False; $user.mDBStorageQuota = $QuotaSize; $user.setinfo()}

Exchange 2007

Exchange 2007 is a lot easier. 

Now choose a quota size in KB
$QuotaSize = 5242880

$Grp = get-group ; forEach($xMem in $Grp.Members){Write-Host $xMem; set-mailbox $xMem -IssueWarningQuota $QuotaSize}

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.