How to set up automatic password reset in Active Directory

Last updated on:

Overview

This article shows how to use ManageEngine ADSelfService Plus as an automatic password reset tool for Active Directory (AD), and how to automate account unlock alongside it.

By following the steps in this guide, you will learn how to:

  • Set up automatic password reset to reset expired AD passwords on a schedule.
  • Enable automatic unlock for AD accounts to unlock locked accounts on a schedule.
  • Configure the DC Updater so reset and unlock statuses reach the domain controllers you select.
  • Notify users when a new password is set or an account is unlocked through email and SMS.

By the end of this article, expired password and lockout requests will be able to be managed automatically, reducing password-related help desk calls.

How AD decides a password has expired

A password expires when its age passes the maximum password age configured in the domain password policy or in a fine-grained password policy that applies to the user. Fine-grained policies apply to user objects and global security groups, not directly to OUs. Accounts set to Password never expires never reach expiry. The automatic reset in ADSelfService Plus acts on passwords that have expired in this sense.

Active Directory expires passwords but does not reset them on a schedule, requiring you to either script the reset or use a tool.

  PowerShell and Task Scheduler ADSelfService Plus Automation
Setup You write and test a script: Find expired accounts with Search-ADAccount -PasswordExpired, reset them with Set-ADAccountPassword -Reset, then set ChangePasswordAtLogon. Enable options in the Automation tab.
New password You generate it and decide how to deliver it securely. Generated from an AD attribute (Custom Text) or from the ADSelfService Plus password policy.
Notifications You build the email or SMS sending. Email and SMS notifications are built in.
Other domain controllers You choose the target domain controller (DC) and wait for replication. The DC Updater pushes statuses to the DCs you select.
Logging and reports Must be generated with another script. Generated from built-in logs and reports.

Prerequisites

Before you configure automatic password reset and account unlock:

  • Check the permissions of the ADSelfService Plus service account. By default, ADSelfService Plus works when that account is a member of Domain Admins. To follow least privilege, delegate only the permissions the account needs instead. See minimum privileges and permissions required.
  • Put your preferred domain controller (DC) first in the domain’s DC list. ADSelfService Plus gets its data from the first DC in that list.
  • Configure email or SMS server settings so users receive password reset and unlock notifications.
  • List the accounts that must not be reset automatically, such as service accounts and privileged accounts.

Steps to set up automatic password reset in Active Directory

1. Configure automatic password reset for expired AD passwords

  1. Log in to ADSelfService Plus with administrative credentials.
  2. Go to Configuration > Self-Service > Policy Configuration > Advanced and open the Automation tab.
  3. Enable Automatically resets domain user’s passwords when they expire.
  4. Set the frequency (Hourly, Daily, Weekly, or Monthly). A shorter interval resets expired passwords sooner.
  5. Choose how new passwords are created:
    • Custom Text: Generates the password from an AD attribute you assign. Because the value is derived from directory data, treat it as temporary and keep the next-logon change in step 6 enabled.
    • Password Policy: Generates the password from the password policy configured in ADSelfService Plus. This is separate from your AD password policy: AD decides when a password expires, and this policy decides what the generated password looks like.
  6. Select Upon automatic password reset, force users to change password at next logon so users replace the generated password with one of their own at next logon. In AD, this sets the account’s User must change password at next logon flag, which AD does not allow on accounts set to Password never expires.
  7. Click OK to save.
    ADSelfService Plus Automation tab showing a monthly automatic password reset for Active Directory with the next-logon password change option selected.

Your automatic password reset tool is now active and resets expired AD passwords on the schedule you set.

2. Configure automatic account unlock for AD accounts

  1. In the Automation tab, enable Automatically unlocks locked down accounts in your domain.
  2. Set the frequency of the scheduler (Hourly, Daily, Weekly, or Monthly).
  3. Click OK to save.
    ADSelfService Plus Automation tab showing a monthly automatic password unlock for Active Directory.

Users are notified by email or SMS when their accounts are unlocked.

How lockouts and unlocks fit together: AD locks an account after the number of failed sign-ins set in the account lockout threshold has been reached. If the account lockout duration is a number of minutes, the account unlocks itself when that time passes. If it is zero, the account stays locked until an administrator unlocks it, as stated in Microsoft’s documentation. The scheduled unlock matters most in this second case and wherever you want locked accounts cleared on a fixed cycle.

Locked AD accounts are now unlocked automatically on the schedule you set.

3. Configure DC Updater for password reset and account unlock synchronization

A change made on one DC reaches the others through replication, which can lag, especially between sites. ADSelfService Plus interacts directly with the first DC in its list, meaning that, until replication catches up, a user whose password was just reset or unlocked can still be rejected by another DC. The DC Updater closes this gap by updating the DCs you choose.

  1. In the Automation tab, enable Update Reset Passwords and Account Unlock status on specific Domain Controllers.
  2. Choose the required Domain Controllers from the drop-down field.
  3. Click OK.
    ADSelfService Plus Automation tab showing the DC Updater setting to routinely update password resets and account unlocks on specific Active Directory domain controllers.

The DC Updater helps changes from automatic password reset and automatic unlock show up promptly on the domain controllers you selected.

This automatic password reset happens in on-premises AD. To keep cloud passwords aligned, use Microsoft Entra ID password sync, AD password sync, or your existing Microsoft Entra Connect setup.

If you use Microsoft Entra Connect password hash sync, enable its Force PasswordChangeOnLogOn feature using PowerShell. Otherwise, the temporary password will not be synced, and users must change their password on-premises before they can sign in to Microsoft Entra ID with the updated credentials. Microsoft recommends enabling it only when self-service password reset and password writeback are on.

Validation and confirmation

After configuration, validate that automation works as intended:

  • Check user accounts to confirm that expired passwords are reset according to your schedule.
  • Test locked accounts to confirm that automatic account unlock clears them.
  • Review the reports in ADSelfService Plus to make sure resets and unlocks run without errors.
  • Confirm that users receive email or SMS notifications when their accounts are reset or unlocked.

If resets or unlocks are not occurring:

  • Check the service account’s permissions against the permissions guide.
  • Make sure the first DC in the domain’s list is reachable and healthy and that the DC Updater lists the right domain controllers.
  • Check the email and SMS server settings if users are not notified.
  • Accounts set to Password never expires do not expire, so they are not candidates for an automatic reset.

Tips

  • Start small: Test with a small group of test accounts before rolling out organization-wide.
  • Tell users what to expect: Educate end users to expect notifications when passwords are reset or accounts are unlocked, reducing confusion and help desk calls.
  • Protect service accounts: A reset changes the password that applications and services have stored, and the password stops working. List the likely candidates with:
    Get-ADUser -Filter 'servicePrincipalName -like "*"' -Properties servicePrincipalName PasswordNeverExpires

    Where you can, move them to group Managed Service Accounts, whose passwords AD changes automatically every 30 days by default.

  • Keep privileged accounts out: Handle Domain Admins and other privileged accounts through a controlled process, with just-in-time elevation and phishing-resistant MFA, not scheduled resets.
  • Stage large resets: If you need to reset many accounts at once, for example, after a security incident, do it in batches by OU or group so the help desk is not flooded. CISA’s mass password reset guidance recommends staging. For bulk resets beyond scheduled expired-password resets, see ADManager Plus.
  • Let the help desk start resets safely: To let technicians start resets without full admin rights, use help desk-assisted password reset with approval workflows.
  • Add self-service and expiry warnings: Automatic reset runs on a schedule. Self-service password reset lets users reset or unlock on demand after verifying their identity, and password expiration notifications warn them before passwords expire.
  • Automatic unlock restores access without anyone asking why the account was locked. Review lockout events (Event ID 4740 on DCs) alongside the unlock activity.

FAQs

How do I set up automatic password reset in Active Directory?

In ADSelfService Plus, go to Configuration > Self-Service > Policy Configuration > Advanced, open the Automation tab, enable the automatic reset option, choose a frequency and password format, then click Save.

Does Active Directory reset passwords automatically?

No. AD expires passwords according to your set policy but does not reset them on a schedule. You need a script or a tool, such as ADSelfService Plus, to do so.

Does automatic password reset apply to all passwords or only expired ones?

The automation setting resets domain users’ passwords when they expire.

How often does it run?

You set the scheduler’s frequency to run hourly, daily, weekly or monthly.

What is the DC Updater for?

It pushes password reset and account unlock statuses to the domain controllers you choose so users are not rejected while replication catches up.