Solved

how to change existing user's email address in AD user General tab?

Posted on 2009-04-07
4
424 Views
Last Modified: 2012-05-06
hi ,
 i have to change 300 users email adddress from "user@abc.com" to "user@xyz.com". i founf some vb script on net as below and i'm need script with clear ouput and prooved one.

SCript:
_________________________________________________________________
Set objParent = GetObject("LDAP://OU=ePortal,DC=testad,DC=com")

objparent.Filter = Array("user")



for each objUser in objParent

  'Wscript.Echo "Modifying " & objUser.Get("sAMAccountName")

      objUser.put "mail", objUser.Get("sAMAccountName") & "@efg.com"


      objuser.put "proxyAddresses", "SMTP:" & objUser.Get("sAMAccountName") & "@email.efg.com"

      objuser.EmployeeType = "AD"

      objUser.put "UserPrincipalName", objUser.Get("sAMAccountName") & "@efg.com"

objuser.Setinfo

 next

Wscript.Echo "Done ;)"
_______________________________________________________
0
Comment
Question by:gokulakrishnanns
  • 2
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
WizardWill earned 50 total points
ID: 24094493
Use admodify vaialble here http://www.codeplex.com/admodify

To do what you need read this article from the link below ---go to heading
Adding a new secondary SMTP address -- just make sure you tick set to primary


http://www.activedir.org/Articles/tabid/54/articleType/ArticleView/articleId/45/Default.aspx
0
 
LVL 6

Expert Comment

by:WizardWill
ID: 24094503
The best way to add new seconday SMTP addresses is to use Exchange Recipient Policies.  However, sometimes you just want to assign a new SMTP address to everyone within a particular OU.  Because Exchange Recipient Policies are (in Exchange 2000 and 2003 at least) based on LDAP queries, you cant select users within an OU as part of an LDAP query.  ADModify allows you do this, which provides a nice workaround to the Recipient Policies limitation.
0
 

Author Comment

by:gokulakrishnanns
ID: 24113459
hi WizardWill,

Actually i had already tested with Admodify which is not helped forme that's why i went for the script.. but i have tried one more time as per the article but still no gain...

my requirement is just update in user's properties "GENERAL " TAB i replace xxx@abc.com with xxx@xyz.com.. Totally i have 800 users in child domains also in which i have to do 300 users and reamining users has been changed already...


0
 

Author Comment

by:gokulakrishnanns
ID: 24154069
Hi All,

can i have soem updates for the last query......?

"Actually i had already tested with Admodify which is not helped forme that's why i went for the script.. but i have tried one more time as per the article but still no gain...

my requirement is just update in user's properties "GENERAL " TAB i replace xxx@abc.com with xxx@xyz.com.. Totally i have 800 users in child domains also in which i have to do 300 users and reamining users has been changed already..."
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

708 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

13 Experts available now in Live!

Get 1:1 Help Now