Hello i try to put the user password check to never expire. When i create the user, the check is always uncheck. I try many twist to execute that but noting work.
There is my code.
DirectoryEntry user = root.Children.Add(adUserName, "user");
// NOTE(cboivin): Documentation : http://msdn.microsoft.com/en-us/library/aa746340(VS.85).aspx
user.Invoke("SetPassword", new object[] { adUserPassword });
// NOTE(cboivin): Ne pas mettre les clefs dans les ressources, Description, PasswordExpirationDate, AccountExpirationDate
user.Invoke("Put", new object[] { "Description", Nms.SiteAccess.Business.Manager.ActiveDirectory._resources.WindowsPermissionManager.UserCreerAutomatiquement + args.AddDescriptif });
user.Invoke("Put", new object[] { "PasswordExpirationDate", args.PasswordExpiration });
user.Invoke("Put", new object[] { "AccountExpirationDate", args.AccountExpiration });
user.CommitChanges();
Anny idéa ?