Looking for some syntax for my console application that will allow me to change the password of a local user. I have tired the UserPrincipal class, and DirectoryEntry class, nothing seems to be working. Any ideas?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Oct 4, 2014, 6:50 AM
Here's a nice article on Active Directory which includes some code to do that:
http://www.codemag.com/Article/1312041
I've put the code from this article into a console app below. I've used the generic way of getting the LDAP connection string in case you're not sure what yours is:
I'm not able to test this code as I'm not connected to AD but it does compile OK.
MarcPosted Oct 3, 2014, 11:45 AM
VulpesPosted Oct 3, 2014, 11:39 AM
Is this the same sort of problem you've had with your previous attempts?
MarcPosted Oct 3, 2014, 11:14 AM
VulpesPosted Oct 2, 2014, 2:11 PM