Pricing  Get Quote
 
 

Get password age with PowerShell

The PowerShell script given below can be used to list the password expiration dates of all the users in an organization. Using PowerShell can be complex and time consuming most of the times.

ADSelfService Plus, an Active Directory self-service password management and single sign-on solution, provides a built-in report that displays the users' password expiration dates.

Here is a comparison between generating the users' password expiration dates through PowerShell and ADSelfService Plus:

PowerShell

Run this PowerShell script to generate the list of users' password expiration dates:
Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" |
Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}
 Copied
Click to copy entire script

ADSelfService Plus

  • Go to Reports > User Reports > Soon-To-Expire Password Users Report.
  • Specify the domain using the Select Domain option.
  • Use the Add OUs option to specify OUs if necessary.
  • Specify the number of days left for expiry using the User Passwords that will expire in option.
  • Exclude disabled users and smart card users from the report using the Exclude User option.
  • Click on Generate to generate the report.

Screenshot:

how-to-get-password-age-with-powershell-1
Advantages of ADSelfService Plus
  • Quick configuration:

    Using ADSelfService Plus, you can generate the password expiration dates of domain users with just a few clicks.

  • Offers multiple reports that provide extensive user information:

    Other than the Soon-to-expire Password Users report, ADSelfService Plus offers other reports that provide important information on the domain users who are locked out and their password expiration status.

  • Notifies users about password expiration:

    ADSelfService Plus offers Password Expiration Notification capability that periodically notifies users through email, SMS, and push notifications to change their passwords before expiration.

  • Automatically generates and emails reports:

    ADSelfService Plus provides a scheduler that can be configured to generate necessary reports at regular intervals and mail them to administrators and managers.

  • Automatically resets passwords:

    ADSelfService provides automatic password reset which, if enabled, runs a scheduler that searches for users' expired passwords and automatically resets them on a regular basis.

  • Exports the reports and searches them for specific entries:

    The reports generated in ADSelfService Plus can be exported in formats like CSV, CSVDE, HTML, and PDF. There is also a built-in search option to locate specific entries in the reports.

Audit the Active Directory users' password expiration dates.

  Get 30-day free trial.
  • Embark on your script-free AD Self-service password management with ADSelfService Plus.
  •  
  • By clicking 'Start your free trial now', you agree to processing of personal data according to the Privacy Policy.
  • Thank you for downloading!

    Your download should begin automatically in 15 seconds. If not, click here to download manually.

    Thank you for downloading!

    Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Resources

ADSelfService Plus trusted by

A single pane of glass for complete self service password management
Email Download Link