Solved

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

Posted on 2009-04-07
4
447 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
Read this checklist to learn more about the 15 things you should never include in an email signature.
In this video we show how to create a mailbox database 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 Servers >> Data…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

828 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