By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 2,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

allow users to change local account passwords

P: n/a
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
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.