Preventing An Active Directory User From Changing His/her Password Using Directoryservices
When creating Active Directory users from a script, I also need to set the option that they can't change their passwords. Via the administrative GUI this is easily accomplished, by
Solution 1:
If you can use .NET 3.5 there's a new namespace in there called System.DirectoryServices.AccountManagment
. The UserPrincipal
class in that namespace will allow you to set "Cannot Change Password" simply by setting the boolean UserCannotChangePassword property to false.
Post a Comment for "Preventing An Active Directory User From Changing His/her Password Using Directoryservices"