+ Post New Thread
Results 1 to 3 of 3
Wireless Networks Thread, AD Scripting Help needed in Technical; We need to populate both the logon areas in AD and we only have users in the Pre Windows 2000 ...
  1. #1
    Grommit's Avatar
    Join Date
    Sep 2006
    Location
    Weston-super-Mare
    Posts
    1,335
    Thank Post
    31
    Thanked 54 Times in 31 Posts
    Rep Power
    25

    AD Scripting Help needed

    We need to populate both the logon areas in AD and we only have users in the Pre Windows 2000 field populated..

    Is there a way to get a bat script to run so as to copy the pre 2000 into the logon field ?

  2. #2

    Join Date
    Jul 2005
    Location
    Rugby
    Posts
    432
    Thank Post
    17
    Thanked 66 Times in 61 Posts
    Rep Power
    35
    I'd use ADModify.net or wisesoft's bulk modify, both nice gui way's to do it.

    Matt

  3. Thanks to saundersmatt from:

    Grommit (23rd October 2008)

  4. #3


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    Run this on each OU, it will set the UserPrincipalName (post 2k logon name) to that of the sAMAccountName (pre-2k logon name).
    you need to change the LDAP path ( OU= , DC= ) and the FQDN @example.college.internal

    Code:
    Set objParent = GetObject("LDAP://OU=students,DC=example,DC=college,DC=internal")
    objparent.Filter = Array("user")
    for each objUser in objParent
    
     objUser.put "UserPrincipalName", objUser.Get("sAMAccountName") &
    "@example.college.internal"
    
     objuser.Setinfo
    
    next
    Wscript.Echo "Done ;)"

  5. Thanks to CyberNerd from:

    Grommit (23rd October 2008)

SHARE:
+ Post New Thread

Similar Threads

  1. Scripting Resources
    By ChrisH in forum Scripts
    Replies: 20
    Last Post: 27th March 2012, 11:39 AM
  2. os x scripting
    By mac_shinobi in forum Mac
    Replies: 5
    Last Post: 22nd August 2008, 09:30 AM
  3. New to scripting
    By FN-GM in forum Scripts
    Replies: 26
    Last Post: 10th August 2007, 10:31 PM
  4. advice needed on weather a new server is needed
    By projector1 in forum Hardware
    Replies: 3
    Last Post: 24th February 2006, 09:20 AM
  5. Scripting IP configuration.
    By Dos_Box in forum Scripts
    Replies: 3
    Last Post: 2nd September 2005, 09:07 AM

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
  •