G
Guest
Looking for a way for users to change their passwords on
local accounts. I followed this KB article, 306271, and
it worked as far as adding a new user. I tried to modify
it to do password changes:
Changed this:
Dim NewUser As DirectoryEntry = AD.Children.Add
("TestUser1", "user")
To this:
Dim NewUser As DirectoryEntry = AD.Children.Find
("TestUser1", "user")
Changed this:
NewUser.Invoke("SetPassword", New Object() {"123456"})
To this:
NewUser.Invoke("ChangePassword", New Object()
{"123456", "654321"})
The error I get is:
'Exception has been thrown by the target of an invocation'
Any ideas on how to use the changepassword method in this
situation?
Thanks for any advice,
RB
local accounts. I followed this KB article, 306271, and
it worked as far as adding a new user. I tried to modify
it to do password changes:
Changed this:
Dim NewUser As DirectoryEntry = AD.Children.Add
("TestUser1", "user")
To this:
Dim NewUser As DirectoryEntry = AD.Children.Find
("TestUser1", "user")
Changed this:
NewUser.Invoke("SetPassword", New Object() {"123456"})
To this:
NewUser.Invoke("ChangePassword", New Object()
{"123456", "654321"})
The error I get is:
'Exception has been thrown by the target of an invocation'
Any ideas on how to use the changepassword method in this
situation?
Thanks for any advice,
RB