Re: Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- From: "Bharat Suneja" <bharat@xxxxxxxxxx>
- Date: Sat, 11 Feb 2006 01:55:25 -0800
John,
Saw something similar somewhere on the web - probably windows it pro site,
and probably a script from paul robichaux. uses the same dictionary approach
as you've used in your script. this is what i ended up using.
thanks!
--
Bharat Suneja
MCSE, MCT
www.zenprise.com
blog: www.suneja.com/blog
-----------------------------------
"John Fullbright" <fullbrij@xxxxxxxxxxx> wrote in message
news:ehlVx9FLGHA.3972@xxxxxxxxxxxxxxxxxxxxxxx
I wrote a script a while back that expands nested groups recursively and
stamps addresses. Sound like the logic used to expand the nested groups
might be useful to you. I used a scripting dictionary to keep track.
' Quick and dirty script to remove the default primary smtp address,set a
new, and put the old one back as a
' secondary for each member of a nested group
' Author - fullbrij@xxxxxxxxxxx
' Creation date - 2/12/2004
'
'
' --------------------------------------------- SCRIPT
CONFIGURATION --------------------------------------------------
'
'
' strGroupDN is the DN of the group you wish to apply the changes to. You
can copy and paste the DN from ADSIEDIT
' strDefaultSuffix is the suffix suffix stamped by the recipient policy
for the domain the group is in
' strNewSuffix is the custom suffix you wish to replace the default suffix
with for strGroupDN
'
' If you need anything more complex than mailnickname as the prefix then
you must modify the script
'
' You will need to create a recipient policy for strNewSuffix with a blank
filter so Exchange will accept for delivery
'
strGroupDN = "CN=Test Group,OU=Information
Technology,OU=Users,OU=Corporate Office,DC=child,DC=mycompany,DC=com"
strDefaultSuffix = "@permutation1.com"
strNewSuffix = "@permutation2.com"
'
'
' ----------------------------------------------- END
CONFIGURATION ---------------------------------------------------
'
'
' create the dictionary and start stamping
set dicSeenGroupMember = CreateObject("Scripting.Dictionary")
StampMembers "LDAP://" & strGroupDN, dicSeenGroupMember
'
Function StampMembers (strGroupADsPath, dicSeenGroupMember)
'
set objGroup = GetObject(strGroupADsPath)
'
for each objMember In objGroup.Members
'
' if the member is a user then stamp it
if objMember.Class = "user" then
' If the smtp address was already there as a secondary smtp
address then delete it
objMember.PutEx 4, "ProxyAddresses", Array("smtp:" &
objMember.mailnickname & strNewSuffix)
objMember.SetInfo
' put the smtp address in as a primary then set mail and
msexchpoliciesexcluded
objMember.PutEx 3, "ProxyAddresses", Array("SMTP:" &
objMember.mailnickname & strNewSuffix)
objMember.Put "mail", objMember.mailnickname & strNewSuffix
objMember.Put "msexchpoliciesexcluded",
"{26491CFC-9E50-4857-861B-0CB8DF22B5D7}"
objMember.SetInfo
' delete the old primary
objMember.PutEx 4, "ProxyAddresses", Array("SMTP:" &
objMember.mailnickname & strDefaultSuffix)
objMember.SetInfo
' add the old primary back as a secondary
objMember.PutEx 3, "ProxyAddresses", Array("smtp:" &
objMember.mailnickname & strDefaultSuffix)
objMember.setinfo
end if
'
' if it is a group then expand the group recursively
if objMember.Class = "group" then
'
if dicSeenGroupMember.Exists(objMember.ADsPath) then
' do nothing to avoid looping if we already stamped it
else
' add it to the dictionary and stamp it
dicSeenGroupMember.Add objMember.ADsPath, 1
StampMembers objMember.ADsPath, dicSeenGroupMember
end if
'
end if
'
next
'
End Function
"Bharat Suneja" <bharatsuneja@xxxxxxxxxxx> wrote in message
news:evdo$0DLGHA.1192@xxxxxxxxxxxxxxxxxxxxxxx
Well, to do this on a group has been a little more complicated because
I'm trying to implement functionality that also works with nested
groups - i.e. changes the limits on all members of nested groups as well,
without getting into a loop (where some group along the group membership
path is also a member of another nested group... ).
Will post to this thread once I'm done, or start a new one.
What it does... :
take group name and the 3 parameters - mailbox limit (you get a warning
when you cross this, attrib mDBStorageQuota), over quota limit (stop
send, mDBOverQuotaLimit), hard limit (stop send and receive,
mDBOverHardQuotaLimit) as command-line arguments.
Search AD for the group, enumerates members, checks if member is a group,
for mailbox-enabled users sets the mDBUseDefault = FALSE, sets
mdBStorageQuota, mDBOverQuotaLimit, mDBOverHardQuotaLimit.
--
Bharat Suneja
MCSE, MCT
www.zenprise.com
blog: www.suneja.com/blog
-----------------------------------------
<MatthewBrown@xxxxxxxxx> wrote in message
news:1139348075.480343.144000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A script would be great! I don't like the idea of having to create
another Store.
Even though your script is still in development, any tips on making my
own?
We're in dire need to cap some people off before we hit said 17GB.
Thanks,
Matt
.
- References:
- Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- From: MatthewBrown
- Re: Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- From: Bharat Suneja
- Re: Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- From: MatthewBrown
- Re: Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- From: Bharat Suneja
- Re: Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- From: John Fullbright
- Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- Prev by Date: Re: My Server running out of space
- Next by Date: Re: Splitting our Exchange 2003 Ent Database
- Previous by thread: Re: Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- Next by thread: Re: Exchange 2003: Changing the Storage Limits on multiple mailboxes at once
- Index(es):
Relevant Pages
|