C
Chris Noble
A user account expiration date can be set using the following code
// Use the DirectoryEntry.InvokeSet method to invoke the
// AccountExpirationDate property setter.
usr.InvokeSet(
"AccountExpirationDate",
new object[] {new DateTime(2005, 12, 29)});
// Commit the changes.
usr.CommitChanges();
Can anyone please tell me what is the recommended way to programmatically
change a user account with an expiry date to Never?
This is equivalent to physically checking the Account Expires Never radio
button in the user properties in the Active Directory Users and Management
Console.
Thanks
// Use the DirectoryEntry.InvokeSet method to invoke the
// AccountExpirationDate property setter.
usr.InvokeSet(
"AccountExpirationDate",
new object[] {new DateTime(2005, 12, 29)});
// Commit the changes.
usr.CommitChanges();
Can anyone please tell me what is the recommended way to programmatically
change a user account with an expiry date to Never?
This is equivalent to physically checking the Account Expires Never radio
button in the user properties in the Active Directory Users and Management
Console.
Thanks