How to clear the expiration date for a user account in Active Directory?

Read on to know how to set a user account expiration date to 'never expires' in Active Directory (AD) using PowerShell and how you can get it done easily with ADManager Plus.

Windows PowerShell

  • Identify the domain in which the account to be modified is located.
  • Create and compile the script for changing the account expiration setting of the AD account. Execute the script in PowerShell.
  • Sample script for changing the account expiration to 'never exppires' for an AD user account:
C:\PS>Clear-ADAccountExpiration -Identity 86843e63-a364-49e0-a7ea-6eeb8838a4f0
Click to copy entire script

ADManager Plus

  • Navigate to Management > User Management > Modify Single User.
  • Select the Domain and the User Account(s) you wish to change the account expiration settings for.
  • Click on the Account tab, and set Account Expires as Never. Then click Apply.


Set Active Directory accounts to never expire using ADManager Plus

» Start 30-day Free Trial

Although modifying account expiration settings for AD accounts with native tools like PowerShell looks simple, it comes with a few limitations:

  • The PowerShell script can be run only from the computers which have the Active Directory Domain Services role installed in them.
  • Need for a new script, in case the account settings are to be changed for multiple users.
  • The syntax, parameters and iterations need to be correct. A typo or incorrect syntax might be difficult to spot and rectify, especially when the script is a long one.
  • Cannot delegate the modification of AD accounts or other AD management tasks to help desk technicians.

ADManager Plus lets you perform the same with a few clicks from its web-based GUI console. It also has options for modifying the account settings of multiple users simultaneously with templates or by importing a CSV file containing the modified attribute values. Learn more about it here.

Manage Active Directory account status in bulk with ADManager Plus.

  Get 30-day free trial.
  • Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thanks
  • Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link