Link to home
Start Free TrialLog in
Avatar of Studio720
Studio720Flag for United States of America

asked on

How Can I Add an bulk an Email Address to the proxyAddresses Attribute of all users in an OU.

How Can I Add an bulk an Email Address to the proxyAddresses Attribute of all users in an OU via script?

I wan to use the same mailnickname as their current primary smtp address, I just want to add a secondary with the new mail domain. Some of the users in the OU already have the address, over half do not. How can I add it to the users that do not?
Avatar of Justin Durrant
Justin Durrant
Flag of United States of America image

Avatar of Studio720

ASKER

I saw this article, but my question about this is given the sample:

Const ADS_PROPERTY_APPEND = 3

Set objUser = GetObject _
    ("LDAP://cn=KenMyer,ou=Finance,dc=fabrikam,dc=com")

objUser.PutEx ADS_PROPERTY_APPEND, "proxyAddresses", _
    Array("kenmyer@northamerica.fabrikam.com ")

Can I change it to:

Const ADS_PROPERTY_APPEND = 3

Set objUser = GetObject _
    ("LDAP://ou=Finance,dc=fabrikam,dc=com")

objUser.PutEx ADS_PROPERTY_APPEND, "proxyAddresses", _
    Array("*@northamerica.fabrikam.com ")

to add the the mailnickname + @northamerica.fabrikam.com to all users of the Finance OU?
that should work... try on a test OU first
This did not work for me.
Can somebody help me with the example above to add a proxyaddress to all recipients in the Finance OU.
To script the objects in an OU, you nead to collect the OU as a recordset and loop through each object in the recordset.

As question is stated, it sounds like you nead to configure a recipient policy
http://support.microsoft.com/kb/319201
ASKER CERTIFIED SOLUTION
Avatar of ach_patil
ach_patil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ach_patil
ach_patil

Glad it helped..

To avoid adding the SMTP address manualy everytime a user iscreated, You can also create an Email Recipient policy based on the criteria you need. This way the SMTP address is added automatically

If you are using Exchange 2003, heres how you can do it.
http://www.computerperformance.co.uk/exchange2003/exchange2003_recipient_policy.htm
http://www.msexchange.org/tutorials/Implementing-Custom-Recipient-Policies.html
As I already have suggested recipient policy, I wonder why http:#22725004 isn't accepted/included as part of solution?