Thursday

C#:Active Directory:Check/Uncheck User must change password at next logon



public void SetuserHasToChangePasswordsInTheNextLoginProperty(bool userHasToChangePasswordsInTheNextLogin)
{
DirectoryEntry de = GetDirectoryObject(UserName);
if (userHasToChangePasswordsInTheNextLogin)
{
ActiveDirectoryHelper.SetProperty(de, "pwdLastSet", 0);
}
else
{
ActiveDirectoryHelper.SetProperty(de, "pwdLastSet", -1);
}
de.CommitChanges();
}

more...

No comments:

here is powershell script on how to get list of files from changesets associated with one tfs task

$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...