ADSI: Change an Account Password
9/24/2004 8:27:19 AM
ADSI script for changing the password for an account.
' accepts the old password and new password for changing. Sub ChangePassword(strOldPassword, strNewPassword) On Error Resume Next Set oUser = GetObject(strDomain & "/" & strUSer) oUser.Password = strNewPassword oUser.SetInfo Set oUser = Nothing If Err <> 1 Then strServerError = "Password change failed!" End If End Sub
|