numb3rs1x
asked on
How to set mailbox size limits on a group?
I see in the Exchange General tab under each user an option to issue warnings or more when the user reaches a certian inbox size. Is there a way to set that to a group?
no.
because groups don't have mailboxes and they don't store emails so they don't have any type of storage allocated to them.
because groups don't have mailboxes and they don't store emails so they don't have any type of storage allocated to them.
or you could run a powershell script that will set the issue warning level for the group members?!
Hi,
There is nothing by term group mailboxes.
I assume that you mean the all users who are part of a particular Group should be having same size limits.
Thanks
Nitin
There is nothing by term group mailboxes.
I assume that you mean the all users who are part of a particular Group should be having same size limits.
Thanks
Nitin
Use mailbox mgmt
http://www.msexchange.org/ tutorials/ Mailbox-Ma nagement.h tml
No other go....or else follow first comment (well I would not do that though)
Thanks
Nitin
http://www.msexchange.org/
No other go....or else follow first comment (well I would not do that though)
Thanks
Nitin
So manybe wrongly assuming Exchange 2007
$Grp = get-group <GroupName>; forEach($xMem in $Grp.Members){Write-Host $xMem; set-mailbox $xMem -IssueWarningQuota unlimited}
Hi Flaphead_com,
True very true...your command is spot on, I was tempted to give that too, unfortunately our friend uses Exchange 2003. !
Cheers
Nitin
True very true...your command is spot on, I was tempted to give that too, unfortunately our friend uses Exchange 2003. !
Cheers
Nitin
okay now with "normal" powershell ;-)
Remember to test this in a lab before production as this is changing user maibox attributes!!
So IssueWarningQuota is actually mDBStorageQuota in the AD
Remember to test this in a lab before production as this is changing user maibox attributes!!
So IssueWarningQuota is actually mDBStorageQuota in the AD
$grp = [adsi]("LDAP://<GroupDN>"); forEach($xMem in $Grp.Member){Write-Host $xMem;$user = [adsi]("LDAP://$xMem"); $user.mDBUseDefaults = $False; $user.mDBStorageQuota = 5242880; $user.setinfo()}
ASKER
You'll have to bear with me here. Where should I issue this command, and what do I need to change to specify my environment?
You could always use a piece of VBS that would take a group name as input (or hard code it, whichever), and then would go and grab all the group member's accounts and configure them for you.. Not that hard. Let me know if you want the code.
ASKER
That would be great. I'm not up to speed enough on code writing.
Easy. Code is below. You'll need to put the name of the group in line 1 (replace MyGroup), and put the limits you want on lines 2, 3 and 4. The values are in KB.
Enjoy!
Enjoy!
GroupName = "MyGroup"
IssueWarning = 75000
ProhibitSend = 125000 'enter a 0 if you do not want to set this property
ProhibitSendAndReceive = 175000 'enter a 0 if you do not want to set this Property
Set oNetwork = CreateObject("Wscript.Network")
Domain = oNetwork.UserDomain
GroupDN = GetObjectDN(GroupName,Domain)
Set oGroup = GetObject("LDAP://" & GroupDN)
Set ArrMembers = oGroup.Members
For Each member In ArrMembers
Member.mDBUserDefaults = False
Member.mDBStorageQuota = IssueWarning
If ProhibitSend > 0 Then Member.mDBOverQuotaLimit = ProhibitSend
If ProhibitSendAndReceive > 0 Then Member.mDBOverHardQuotaLimit = ProhibitSendAndReceive
Member.setInfo()
Next
Function GetObjectDN(strObject, strDomain)
On Error Resume Next : Err.Clear
Set objNameTranslate = CreateObject("NameTranslate")
objNameTranslate.Init 3, ""
objNameTranslate.Set 3, strdomain & "\" & strObject
strObjectDN = objNameTranslate.Get(1)
If Err.Number <> 0 Then
strObjectDN = ""
End If
Set objNameTranslate = Nothing
On Error Goto 0
GetObjectDN = strObjectDN
End Function
Okay you just need to download Windows Powershell, and you could put it on an Exchange server or a desktop that can see the AD.
Now to start with, 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 = "<groupDN">
$grp = [adsi]("LDAP://$mygroup")
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:
$grp.member
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()}
Now to start with, 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 = "<groupDN">
$grp = [adsi]("LDAP://$mygroup")
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:
$grp.member
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()}
ASKER
exx1976:
I tried this script you submitted. I'm not sure if I did it correctly. Do I run this on the Exchange Server or just any server that has AD? Should I see the results when I look at the Exchange settings in the user's account?
I tried this script you submitted. I'm not sure if I did it correctly. Do I run this on the Exchange Server or just any server that has AD? Should I see the results when I look at the Exchange settings in the user's account?
You can run it from any machine in the domain, but the account that runs it must have proper permissions to make those changes in AD.
ASKER
Ok. that's what I did, and I have the proper permissions. I must have entered something wrong. I will take a look at it when I get a chance.
ASKER
exx1976:
I think I need some details, so let's say my group's name is "InboxLimit" and it's in the default Users folder, and my domain is "my.domain.com". I will show you how I have it written in the script and you can correct me if I've got the wrong synax:
GroupName = "InboxLimit"
IssueWarning = 5000
ProhibitSend = 0 'enter a 0 if you do not want to set this property
ProhibitSendAndReceive = 0 'enter a 0 if you do not want to set this Property
Set oNetwork = CreateObject("Wscript.Netw ork")
Domain = omy.domain.com
GroupDN = GetObjectDN(GroupName,Doma in)
Set oGroup = GetObject("LDAP://" & GroupDN)
Set ArrMembers = oGroup.Members
For Each member In ArrMembers
Member.mDBUserDefaults = False
Member.mDBStorageQuota = IssueWarning
If ProhibitSend > 0 Then Member.mDBOverQuotaLimit = ProhibitSend
If ProhibitSendAndReceive > 0 Then Member.mDBOverHardQuotaLim it = ProhibitSendAndReceive
Member.setInfo()
Next
Function GetObjectDN(strObject, strDomain)
On Error Resume Next : Err.Clear
Set objNameTranslate = CreateObject("NameTranslat e")
objNameTranslate.Init 3, ""
objNameTranslate.Set 3, strdomain & "\" & strObject
strObjectDN = objNameTranslate.Get(1)
If Err.Number <> 0 Then
strObjectDN = ""
End If
Set objNameTranslate = Nothing
On Error Goto 0
GetObjectDN = strObjectDN
End Function
Should that work? It seems like there is something more that should be specified.
I think I need some details, so let's say my group's name is "InboxLimit" and it's in the default Users folder, and my domain is "my.domain.com". I will show you how I have it written in the script and you can correct me if I've got the wrong synax:
GroupName = "InboxLimit"
IssueWarning = 5000
ProhibitSend = 0 'enter a 0 if you do not want to set this property
ProhibitSendAndReceive = 0 'enter a 0 if you do not want to set this Property
Set oNetwork = CreateObject("Wscript.Netw
Domain = omy.domain.com
GroupDN = GetObjectDN(GroupName,Doma
Set oGroup = GetObject("LDAP://" & GroupDN)
Set ArrMembers = oGroup.Members
For Each member In ArrMembers
Member.mDBUserDefaults = False
Member.mDBStorageQuota = IssueWarning
If ProhibitSend > 0 Then Member.mDBOverQuotaLimit = ProhibitSend
If ProhibitSendAndReceive > 0 Then Member.mDBOverHardQuotaLim
Member.setInfo()
Next
Function GetObjectDN(strObject, strDomain)
On Error Resume Next : Err.Clear
Set objNameTranslate = CreateObject("NameTranslat
objNameTranslate.Init 3, ""
objNameTranslate.Set 3, strdomain & "\" & strObject
strObjectDN = objNameTranslate.Get(1)
If Err.Number <> 0 Then
strObjectDN = ""
End If
Set objNameTranslate = Nothing
On Error Goto 0
GetObjectDN = strObjectDN
End Function
Should that work? It seems like there is something more that should be specified.
ASKER
Oh, and this is from a second try. The first time, I only changed the group name to "InboxLimit" like you had instructed in the initial posting.
You weren't supposed to change the "Domain =" line. That's why it doesn't work. Put it back the way I wrote it and you should be fine.
ASKER
So I set it back and I got a runtime error:
"object doesn't support this property or method:' member.mDBuserdefaults'
code:800A01B6"
"object doesn't support this property or method:' member.mDBuserdefaults'
code:800A01B6"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It worked! That is awesome. Thank you very much!
Yes there is, but you'll have to create a seperate information store, move the group's mailboxes to this store and set a limit on the store. If you need help performing this, please let me know.
Cheers