The password expiration policy in Active Directory sets the maximum age of a user’s password. Once this period is reached, the password expires and the user is typically prompted to change it during the next interactive logon. Depending on the authentication method/app, expired passwords may also cause authentication failures until the password is changed.
In this tutorial, we will show how to check and configure the password expiration settings in Active Directory using Group Policy, Fine-Grained Password Policies, and PowerShell with Microsoft’s latest recommendations.
What is Password Expiration in Active Directory?
Password expiration is a security policy in an Active Directory domain that forces users to change their passwords once they have reached their maximum age. This policy defines the number of days that users can use the same password before it expires. Thus, it determines how often and when a user is required to change their domain password.
The password expiration policy in AD is configured using the “Maximum Password Age” option. It can be configured using either the Default Domain Policy or a custom Fine-Grained password policy. Administrators can improve the security of user and service accounts within organizations by enforcing regular password changes.
Warning. Before enabling strict password expiration policies, you need to ensure that service accounts, scheduled tasks, IIS application pools, scripts, and apps using stored credentials are properly documented and updated. Keep in mind that expired service account passwords may cause widespread authentication failures and service outages.
In modern AD environments, Microsoft recommends using Group Managed Service Accounts (gMSA) instead of traditional service accounts whenever possible. Note that gMSA passwords are automatically managed and rotated by AD.
If an Active Directory user’s password expires, they won’t be able to log on to the domain or access domain resources until they change their password. The following prompt will appear on the Windows login screen after the user has interactively entered the expired password:
Your password has expired and must be changed.

Ways to set password expiration settings in AD domain
There are two ways to set password expiration settings in an Active Directory domain:
- The Default Domain Policy GPO is used to configure password expiration settings that apply to all users.
- Fine-grained password policies containing Password Setting Objects (PSOs) can be used to configure custom password expiration settings for specific users and groups.
Note. Fine-Grained Password Policies (FGPP) are not Group Policy Objects (GPOs). They are stored in AD as Password Settings Objects (PSOs) and are processed directly by DCs.
Password Expiration and Account Lockout Interaction
Keep in mind that expired passwords can indirectly contribute to account lockout cases. In case a user repeatedly attempts authentication with an expired password:
- each attempt may be counted as a failed logon
- this can trigger Account Lockout Policy thresholds
- especially in environments with cached credentials or background services
Important note. Keep in mind that password expiration and account lockout are separate mechanisms but may interact during repeated authentication attempts.
Configure the Default Password Expiration Policy in Active Directory
The domain’s default password expiration configuration is set using the Default Domain Policy.
- Open the Group Policy Management Console (GPMC.msc) on a domain controller;
- Expand the Group Policy Objects container, right-click on the Default Domain Policy and select Edit;

- Navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Password Policy. The Maximum password age option defines the number of days a user password can be used before the system requires the domain user to change it. By default, the user account passwords expire after 42 days from the last password change;

- You can edit the default policy value. For example, set the password to expire after 90 days. Save the changes;

- The updated password policy settings are usually replicated to other DCs within several minutes, depending on AD replication topology and replication intervals.. Check new policy settings with the following PowerShell command:
Get-ADDefaultDomainPasswordPolicy |select MaxPasswordAge

Note. You can use repadmin /replsummary to verify if AD replication is healthy and that updated password policy settings have replicated successfully between DCs:
repadmin /replsummary
Disable the Password Expiration in Active Directory
To completely disable password expiration for a user account in an AD domain, set the Maximum Password Age setting to 0. This means that current users’ passwords will never expire.

After implementing this policy, users can change their passwords at any time. If a user’s password is compromised and an administrator wants the user to change it, they can enable the User must change password at next logon’ option in the user account properties in the ADUC console.

Enable the Active Directory Password Expiration Notification
You can use Group Policy to enable Active Directory password expiration notifications on users’ computers. These notifications appear when a user password is about to expire.
These notifications can be enabled using the GPO option “Interactive Logon: Prompt user to change password before expiration under Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options.

By default, the local security settings in Windows determine that such a notification should appear five days before the password expires. You can change the number of days before expiration at which you want to notify users, or you can disable these notifications by setting this number to 0.
The reminder that appears on the user’s screen as their password nears expiration looks like this:

How to Check When an AD User’s Password Expires Using PowerShell
The expiration policy is based on the pwdLastSet attribute for each user, which contains a timestamp updated whenever the password is changed. AD user properties don’t contain the expiration date of a password. This value is calculated based on the pwdLastSet value and the effective password policy for the user. The msDS-UserPasswordExpiryTimeComputed value, which is recalculated each time, can be used to determine when a user’s password will expire.
Check Single User Password Expiration Policy with PowerShell
To find out when a specific user’s password expires, you can use PowerShell (requires the PowerShell AD module installed on a computer). Replace b.jackson with the username you need.
Get-ADUser -Identity b.jackson -Properties PasswordExpired, msDS-UserPasswordExpiryTimeComputed |
Select-Object Name, PasswordExpired,
@{
Name = "PasswordExpiryDate"
Expression = {
$value = $_."msDS-UserPasswordExpiryTimeComputed"
if ($value -eq 9223372036854775807) {
return "Never Expires"
}
[datetime]::FromFileTime($value)
}
}
This command retrieves the password expiration date for a user. The value of the PasswordExpired attribute indicates whether the user’s password has expired or not.

Get All AD Users’ Password Expiration Dates
You can list the password expiration dates for all of your AD users at once. In this example, we’ll only list users without the PasswordNeverExpires option enabled:
Get-ADUser -Filter 'PasswordNeverExpires -eq "False"' -Properties msDS-UserPasswordExpiryTimeComputed |
Select-Object Name,
@{
Name="PasswordExpiryDate"
Expression={
$value = $_."msDS-UserPasswordExpiryTimeComputed"
if ($value -eq 9223372036854775807) {
return "Never Expires"
}
[datetime]::FromFileTime($value)
}
}

Configuring Fine-Grained Password Expiration Policy in Active Directory
The domain-wide Default Domain Policy sets the same password expiration settings for all users. If you want to apply custom (granular) password expiration for specific user groups or individual user accounts, you should use the Fine-Grained Password Policy (FGPP).
Configure FGPP Using Active Directory Administration Center
The Fine-Grained Password Expiration policies are configured using the Active Directory Administration Center console.
- Open the dsac.exe snap-in and navigate to Domain > System > Password Settings Container;

- Under the Tasks pane, click New → Password Settings;

- Provide a unique name for the password policy, precedence, and the maximum password age in days. Disable other policy options that you don’t want to apply. The Precedence value determines which Fine-Grained Password Policy wins in case multiple PSOs apply to the same user. Lower precedence values have higher priority. For example, a PSO with precedence 1 overrides a PSO with precedence 10.

- Specify the users or groups to whom the policy should apply by adding them to the “Directly Applies To” section. In this example, we added the CA Server Admins group.

- Click OK to save the password policy.
The Password Settings Object (PSO) will now be applied to the specified user or group, providing a custom password expiration policy that differs from the domain-wide settings.
Manage the Fine-Grained Password Policy with PowerShell
Also, you can create and apply the fine-grained password expiration policy using PowerShell:
# Create the new Fine-Grained password expiration policy
$policySettings = @{
Name = 'Expire Password after 60-days'
MinPasswordAge = '1.00:00:00'
MaxPasswordAge = '60.00:00:00'
Precedence = 1
}
New-ADFineGrainedPasswordPolicy @policySettings
# Display the new Fine-Grained password expiration policy
Get-ADFineGrainedPasswordPolicy $policySettings['Name']

Now, let’s assign this password expiration policy to target users and AD groups. In this example, we’ll apply the policy to the CA DevOps group and the jsmith user account:
# Add new subjects to the password expiration policy
Add-ADFineGrainedPasswordPolicySubject -Identity 'Expire Password after 60-days' -Subjects 'CA DevOps', 'jsmith'
# Display the password expiration policy subjects
Get-ADFineGrainedPasswordPolicySubject -Identity 'Expire Password after 60-days'

Check Effective Password Policy for a User
The following command displays the effective password policy that applies to the user (including settings inherited from Fine-Grained Password Policies). To verify the updated policy has replicated to all DCs, run the following command:
Get-ADUserResultantPasswordPolicy jsmith
Does Microsoft Still Recommend Periodic Password Expiration?
In modern Microsoft security baselines, we don’t universally recommend you to use periodic password expiration (because forced password changes often lead users to choose weaker predictable passwords; for example: Password1 → Password2).
However, you should consider disabling password expiration in environments that use modern security controls such as:
- Multi-Factor Authentication (MFA)
- Strong password policies
- Microsoft Entra Password Protection
- Compromised password detection
- Account lockout protection
In legacy environments without MFA/where weak passwords are common, periodic password expiration may still provide additional security benefits. Note that privileged admin accounts (Domain Admins, Enterprise Admins, Tier-0 accounts, break-glass accounts, etc.) often require stricter password and authentication policies than standard users (even in environments where password expiration is generally disabled).
Instead, you should use modern tools to help mitigate this, such as Microsoft Entra Password Protection, Multi-Factor Authentication (MFA), etc. For example, in Microsoft 365 organization passwords are set to never expire for all users.
In case your organization has implemented MFA together with strong password policies, password protection, and modern authentication controls, you may consider disabling periodic password expiration for standard user accounts. Otherwise, set the maximum password age to 90 or 180 days, which is standard practice for most organizations.
Brief Explanation of Microsoft Entra Password Protection
Microsoft Entra Password Protection enforces password quality by blocking known weak/compromised passwords. It uses:
- global banned password list (Microsoft-maintained)
- custom organization-specific banned passwords
- fuzzy matching to detect variations (e.g., Password1 → P@ssword1)
The purpose is to prevent weak password selection instead of forcing periodic password changes.
What is password expiration in Active Directory?
Password expiration is an Active Directory security policy that forces users to change their passwords after a specified number of days. The policy is controlled by the Maximum Password Age setting in either the Default Domain Policy or a Fine-Grained Password Policy (FGPP).
Where is the default password expiration policy configured?
The default password expiration policy is configured in the Default Domain Policy GPO:
Computer Configuration – Policies – Windows Settings – Security Settings – Account Policies – Password Policy
The key setting is Maximum password age.
What is the default password expiration period in Active Directory?
By default, Active Directory sets passwords to expire after 42 days from the last password change.
How do I change the password expiration period in Active Directory?
Open Group Policy Management Console (GPMC.msc), edit the Default Domain Policy, and modify the Maximum password age setting. For example, you can set passwords to expire after 90 days.
How can I disable password expiration in Active Directory?
To disable password expiration domain-wide, set the Maximum Password Age value to 0. This means passwords will never expire. You can also enable the Password never expires option for individual user accounts.
What happens when an AD user password expires?
When a password expires, the user cannot authenticate to the domain or access domain resources until the password is changed. Users typically see the message:
“Your password has expired and must be changed.”

