allow users to change local account passwords

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top