lastpasswordset

Determine the maximum password age in Active Directory

I want to expire users' passwords on an individual basis in Microsoft Active directory at different times. I understand that each user within AD does not have it's own password expry time. Instead there is a Maximum Password Age associated with the domain, and a LastPasswordSet date associated with the user. I intend to set the LastPas...

Setting the LastPasswordSet date for a user in Active Directory

I want to set the LastPasswordSet attribute of a user in Microsoft Active Directory. The .NET UserPrincipal API exposes the LastPasswordSet property as readonly. Is there a way around this, to set the value (perhaps using ADSI)? Edit: MSDN provides the following example code: usr.Properties["pwdLastSet"].Value = -1; // To turn on, ...