using System.DirectoryServices;using ActiveDs;
//Add reference to COM Active DS TypeLib
static void DontExpirePassword(DirectoryEntry User)
{
int val;
const int ADS_UF_DONT_EXPIRE_PASSWD =0x10000;
val = (int) User.Properties["userAccountControl"].Value;
User.Properties["userAccountControl"].Value = val ADS_UF_DONT_EXPIRE_PASSWD;
User.CommitChanges();
}
Sunday, October 23, 2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment