Luxtech
asked on
How to use a VBS script to mass change user passwords
I have just migrated from NT4 to windows 2003. I have moved over 400 users into an OU called users and want to mass change all their passwords to Password1. I have looked at a few VBS scripts but am having trouble with them. Any help would be appreciated?
Thanks!
Michael
Thanks!
Michael
ASKER
Hi Chris
I am still having problems with this, I am getting an error on the script that sys:
line: 1
char: 1
Error: A referral was returned from the server.
code: 8007202b
source: (null)
I have changed the obj names to the users ou.
Thanks
I am still having problems with this, I am getting an error on the script that sys:
line: 1
char: 1
Error: A referral was returned from the server.
code: 8007202b
source: (null)
I have changed the obj names to the users ou.
Thanks
Oh they're in the default Users OU? That one isn't really an OU (for whatever reason MS decided) it should be:
Set objOU = GetObject("CN=Users,DC=You
After that it can be treated in exactly the same way as above.
Chris
ASKER
Hi Chris
Thanks for your help but I used AD infinitum to mass change everyones password which worked fine.
I appreciate your time looking into this for me!
Take care
Michael
Thanks for your help but I used AD infinitum to mass change everyones password which worked fine.
I appreciate your time looking into this for me!
Take care
Michael
No problem.
Chris
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here we go... nice and little. You'll need to fill in the password and the path for the OU. This is based on the domain name being yourdomain.local so alter as applicable.
Set objOU = GetObject("LDAP://OU=SomeO
objOU.Filter = Array("user")
For Each objUser in objOU
objUser.SetPassword "NewPassword1"
Next
And that's all there is to it unless they're in sub-OUs and such.
HTH
Chris