Hello,
Thank you for specifying. To reset a user password and enable the User must change password at next logon option at the same time, the below script can be executed in the Run a program or PowerShell script Custom Command action.
# Bind to the user
$user = $Context.BindToObjectEx($Context.TargetObject.AdsPath , $True)
# Enable the 'User must change password at next logon' option
$user.Put("pwdLastSet", 0)
# Disable the 'Password never expires' option
$user.Put("userAccountControl", 0)
[int]$passwordNeverExpires = [Softerra.Adaxes.Interop.Adsi.PersistentObjects.ADS_USER_FLAG_ENUM]::ADS_UF_DONT_EXPIRE_PASSWD
$user.PutPropertyItemMask("userAccountControl", $passwordNeverExpires)
# Disable the 'User cannot change password' option
$user.Put("adm-CanNotChangePassword", $False)
# Generate a password
$rootDSE = $Context.BindToObject("Adaxes://RootDSE")
$password = $rootDSE.GeneratePassword($Context.TargetObject)
# Set Password
$user.Put("unicodePwd", $password)
# Save changes
$user.SetInfo()