+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 30
Windows Thread, Entering email addresses for muliple users in Active Directory in Technical; Hi, I need to enter the email addresses for all our staff and students 1000+ within our active directory. For ...
  1. #1
    machin05's Avatar
    Join Date
    Dec 2007
    Posts
    337
    Thank Post
    22
    Thanked 26 Times in 24 Posts
    Rep Power
    24

    Entering email addresses for muliple users in Active Directory

    Hi,

    I need to enter the email addresses for all our staff and students 1000+ within our active directory. For each user their email address will be in the format of %username%@schooldomain.sch.uk

    This is a different domain name to the one used by active directory. I was hoping you folks know of a way to update user information across the whole domain?

    At the moment all users email address field in AD is blank.

    So far I've tried using some software call Active User Manager to highlight multiple users in an OU and update the email address field using the %username%@schooldomain.sch.uk, but once that is applied the value of %username% remains, and doesn't change to j.smith etc.

    Hope that makes sense, if not fire away with your questions!

    Any info/advice is greatly appreciated...

    Cheers,
    Will
    Last edited by machin05; 14th October 2008 at 03:14 PM.

  2. #2

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,157
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    What email system? I'm guessing not Exchange because that does it for you (you specify the default form of email and the recipient update policy does magic)

    If it's just storing data in the email address field (not creating mailboxes) then it's easy to script it or admod from Joeware can also do this for you - there's an example here to do exactly what you want.

  3. #3
    machin05's Avatar
    Join Date
    Dec 2007
    Posts
    337
    Thank Post
    22
    Thanked 26 Times in 24 Posts
    Rep Power
    24
    Sorry, forgot to mention our email system is our LA supplied Mymail system, which is a webmail based system.

    I will have a look at those links, cheers.

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    It's easy; open Active Directory Users and Computers, select the users you want to update, get their properties, and Email to the variable field you have already used, %username%@restofaddress. ADUC will flesh out the username for you. You're not restricted to the domain name AD uses, it's a free-form field.

  5. #5
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    22
    Out of curiosity why do you want to add the email address in the email line in AD, we also use the mymail system and just wondered what you were planning to do.

  6. #6

    Join Date
    Nov 2007
    Location
    Rotherham
    Posts
    1,678
    Thank Post
    122
    Thanked 126 Times in 102 Posts
    Rep Power
    46
    Quote Originally Posted by powdarrmonkey View Post
    It's easy; open Active Directory Users and Computers, select the users you want to update, get their properties, and Email to the variable field you have already used, %username%@restofaddress. ADUC will flesh out the username for you. You're not restricted to the domain name AD uses, it's a free-form field.
    Can you? Aw rubbish! I spend about an hour on monday using DSQUERY and DSMOD (and Excel!)to populate the E-mail address field for all our users.

    Though having said that your method is only easy if you have your users in a single or limited number of OU's. If there is a large number of OU's then it's probably easier to use DSQUERY to get the distinguished name of all the users then DSMOD to change them so I don't feel so bad.

  7. #7


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    I set tehm like this when we installed our zimbra server

    Code:
    Set objParent = GetObject("LDAP://OU=Year CC,DC=College,DC=internal")
    
    objparent.Filter = Array("user")
    
    
    
    for each objUser in objParent
    
      'Wscript.Echo "Modifying " & objUser.Get("sAMAccountName")
    
    	objUser.put "mail", objUser.Get("sAMAccountName") & "@email.address"
    
    	objuser.put "targetAddress","SMTP:" & objUser.Get("sAMAccountName") & "@email.address"
    
    	objuser.put "proxyAddresses", "SMTP:" & objUser.Get("sAMAccountName") & "@email.address"
    
    
    	objuser.put "mailNickname", objUser.Get("sAMAccountName")
    
    
    objuser.Setinfo
    
     
    
        
    
    next
    
    Wscript.Echo "Done ;)"
    then ran it on each OU

  8. #8


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    Quote Originally Posted by tomscaper View Post
    Out of curiosity why do you want to add the email address in the email line in AD, we also use the mymail system and just wondered what you were planning to do.
    If the email is in AD you can use outlook to search and very easily populate external systems such as moodle /various linux servers with that information in AD it's easy to dynamically create mailing groups for class lists etc

  9. #9

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by Stuart_C View Post
    Though having said that your method is only easy if you have your users in a single or limited number of OU's. If there is a large number of OU's then it's probably easier to use DSQUERY to get the distinguished name of all the users then DSMOD to change them so I don't feel so bad.
    Then do a find from the top of your OU tree, search for wildcard, and select the appropriate people from the results.

  10. #10

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,157
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    Quote Originally Posted by powdarrmonkey View Post
    Then do a find from the top of your OU tree, search for wildcard, and select the appropriate people from the results.
    Things like this only work on small networks; my last place had c. 15,000 users in AD. I haven't counted them here but it's easily twice that - selecting them all from a list is non-trivial :-)

  11. #11

    Join Date
    Aug 2007
    Location
    South Yorkshire
    Posts
    70
    Thank Post
    49
    Thanked 10 Times in 10 Posts
    Rep Power
    16

    ADModify

    We use ADModify to do this sort of thing. Just add the OUs you want to process, tell it what you want to change and it's done in seconds.

  12. #12
    machin05's Avatar
    Join Date
    Dec 2007
    Posts
    337
    Thank Post
    22
    Thanked 26 Times in 24 Posts
    Rep Power
    24
    Cheers for all the replies folks.

    I want to update the email line in AD for use within Moodle. We're in the process of setting it up for our school and you can use that field to auto-complete users for the first time they log into moodle.

    I will have a look at the different methods for updating AD info that you all have detailed and let you know what works for me.

    I know this might sound antiquated, but we're still running a Win2000 AD so i believe selecting multiple users is a no-no.

    Peace

  13. #13
    machin05's Avatar
    Join Date
    Dec 2007
    Posts
    337
    Thank Post
    22
    Thanked 26 Times in 24 Posts
    Rep Power
    24
    OK,
    very quick update.

    Selecting multiple users works when done from an XP workstation using the Windows 2003 Admin Pack

    BUT

    I've just realised that our staff user names are in the format of j.blogs but our email address are jblogs@schoolname.bham.sch.uk. Therefore using the %username% tag will enter the incorrect email address.

    Any ideas on a quick way around this. Maybe using excel files to export, remove the full stops, then update the AD containers?

    Cheers,
    Will

  14. #14

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,866
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    You won't be able to do it natively, you'll have to extract and import as you say.

  15. #15
    machin05's Avatar
    Join Date
    Dec 2007
    Posts
    337
    Thank Post
    22
    Thanked 26 Times in 24 Posts
    Rep Power
    24
    Quote Originally Posted by powdarrmonkey View Post
    You won't be able to do it natively, you'll have to extract and import as you say.
    Thought as much.

    Any pointers or example scripting will be of great help as my own scripting experience has been gathered on a very ad hoc basis.

    I can export a list of the users an use excel formula to remove the full stop and append the domain name, but then importing the new values to the correct containers in ad.... GULP!

    Cheers,
    Will

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Cannot create users in Active Directory
    By WithoutMotive in forum Windows
    Replies: 17
    Last Post: 6th February 2009, 11:20 AM
  2. Active Directory-Script for Creating Bulk Users
    By calapso in forum How do you do....it?
    Replies: 8
    Last Post: 14th January 2009, 06:32 PM
  3. Importing new users into Active Directory
    By Mr_M_Cox in forum How do you do....it?
    Replies: 16
    Last Post: 4th November 2008, 11:36 AM
  4. Active directory email options
    By Shrimpersfan in forum Windows
    Replies: 4
    Last Post: 16th May 2008, 12:53 PM
  5. Replies: 2
    Last Post: 28th November 2007, 04:40 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •