How to Change ADS password at initial login
I wan开发者_开发技巧t to change the initially assigned password at the next login on a ADS container.. How to do this programmatically ?
You can change a password in Active Directory using the DirectoryEntry class:
DirectoryEntry directoryEntry = new DirectoryEntry(ADPath, ADUser, ADPassword, AuthenticationTypes.Secure);
directoryEntry.Invoke("ChangePassword", new object[]{strOldPassword, strNewPassword});
- Resetting Passwords in Active Directory with C# ASP .NET
精彩评论