Solved

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

Posted on 2008-10-13
11
1,334 Views
Last Modified: 2008-10-19
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?
0
Comment
Question by:Studio720
  • 3
  • 2
  • 2
  • +1
11 Comments
 
LVL 23

Expert Comment

by:Justin Durrant
Comment Utility
0
 

Author Comment

by:Studio720
Comment Utility
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?
0
 
LVL 23

Expert Comment

by:Justin Durrant
Comment Utility
that should work... try on a test OU first
0
 

Author Comment

by:Studio720
Comment Utility
This did not work for me.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Studio720
Comment Utility
Can somebody help me with the example above to add a proxyaddress to all recipients in the Finance OU.
0
 
LVL 31

Expert Comment

by:Henrik Johansson
Comment Utility
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
0
 
LVL 13

Accepted Solution

by:
ach_patil earned 500 total points
Comment Utility
There is another easy way to do it. Instead of scripting you can use ADModify to add the proxy address.

Download it from here
http://www.codeplex.com/admodify
Tutorial
http://www.activedir.org/Articles/tabid/54/articleType/ArticleView/articleId/45/Default.aspx

Run it and select your OU... Select all users for whom you need to add the email address. In the Email Addresses tab. Add the format of the SMTP address you need. Click on Go.

I would suggest you first try it on a Test OU
0
 
LVL 13

Expert Comment

by:ach_patil
Comment Utility
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
0
 
LVL 31

Expert Comment

by:Henrik Johansson
Comment Utility
As I already have suggested recipient policy, I wonder why http:#22725004 isn't accepted/included as part of solution?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now