Jump to content

Recommended Posts

Posted

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 ?

Posted

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

 

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 ;)"

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...