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,426 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
11 Comments
 
LVL 23

Expert Comment

by:Justin Durrant
ID: 22704700
0
 

Author Comment

by:Studio720
ID: 22704780
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
ID: 22704813
that should work... try on a test OU first
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:Studio720
ID: 22705107
This did not work for me.
0
 

Author Comment

by:Studio720
ID: 22706667
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
ID: 22725004
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
ID: 22729716
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
ID: 22731047
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
ID: 22732435
As I already have suggested recipient policy, I wonder why http:#22725004 isn't accepted/included as part of solution?
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

634 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