I am looking to be able to direct a user to the Windows CTRL+ALT+DEL Change Password screen as built into Windows but I have not been able to find any lead into making this happen. This is something that I want to use instead of going via a less secure method of creating my own Windows form for this. Is there a command line shortcut, C# or PowerShell string that can load this screen for a user when required?
Notes about this,
I have tried to contact saslib@ms but email have bounced.
The 'net user' command does not help as I need this for domain (AD-DS) user logons.
Many thanks all
Update
This can be achieved through the SendSAS function in Sas.dll included in the Microsoft Windows Software Development Kit . This function needs to be invoked in C#.
You could also build a custom form which updates the users password directly in the AD.
using (var context = new PrincipalContext( ContextType.Domain ))
{
using (var user = UserPrincipal.FindByIdentity( context, IdentityType.SamAccountName, userName ))
{
user.SetPassword( "newpassword" );
// or
user.ChangePassword( "oldPassword", "newpassword" );
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.