I wrote this a while back to muck around with proxyaddresses. You should be able to modify it to meet your need.
' 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@comcast.net
' 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