Grommit Posted October 22, 2008 Posted October 22, 2008 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 ?
saundersmatt Posted October 22, 2008 Posted October 22, 2008 I'd use ADModify.net or wisesoft's bulk modify, both nice gui way's to do it. Matt 1
CyberNerd Posted October 22, 2008 Posted October 22, 2008 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 ;)" 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now