Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
1,469 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
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

688 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