Skip to content
LogoTechnipages
LogoTechnipages
  • Topics
        • Android
        • Browsers
        • Gaming
        • Hardware
        • Internet
        • iPhone
        • Linux
        • macOS
        • Office
        • Reviews
        • Software
        • Windows
        • Definitions
        • All Recent Posts
  • Product Reviews
  • About

PowerShell: Check When User Last Set Active Directory Password

Mitch BartlettJanuary 23, 2020 Comments (1)
Active Directory logo

If a user can’t access an application that authenticates with Microsoft Active Directory, it’s helpful to check to see when the user last set their password since the application may be using cached credentials. Here’s how to use PowerShell to get the passwordlastset value.

  1. Select the “Start” button, then type “powershell“.
  2. Right-click on “Windows PowerShell“, then select “Run as Administrator“.
  3. Provide credentials for a user that has access to Active Directory.
  4. Now you can use the following to find the when a user set the password last.
  5. Replace “theusername” with the actual username of the user you wish to query:

get-aduser -identity theusername -properties passwordlastset | ft Name, passwordlastset

You could also grab all users in a certain OU using this:

get-aduser -Filter * -properties passwordlastset -SearchBase "OU=Staff,OU=Users,DC=domain,DC=com" | ft Name, passwordlastset

Or just get the enabled accounts:

get-aduser -Filter 'enabled -eq $true' -properties passwordlastset -SearchBase "OU=Staff,OU=Users,DC=domain,DC=com" | ft Name, passwordlastset, enabled

Export it to a CSV file:

get-aduser -Filter 'enabled -eq $true' -properties passwordlastset -SearchBase "OU=Staff,OU=Users,DC=domain,DC=com" | Select Name, passwordlastset, enabled | Export-csv -path c:\Temp\PassLastSet.csv

Categories: Windows

Author Mitch Bartlett

Through my career that spans over 20 years I have become an expert in Microsoft Systems Administration, Android, and macOS. I started this site as a technical guide for myself and it has grown into what I hope is a useful knowledgebase for everyone.

You Might Also Like

  • How to Turn on Cortana Voice for Desktop

    MonaWindows
  • Quickly Create a Shutdown Timer in Windows 10

    Judy SanhzWindows
  • Windows 11 22H2 Download The Ultimate Guide (Photo: Courtesy of Microsoft)

    How to Open Services in Windows 11

    Judy SanhzWindows
  • iMovie Windows Header

    9 Best iMovie Equivalents for Windows 11

    Tamal DasSoftware

Comments

  1. Mubashir says:
    October 9, 2020 at 1:13 am

    Thank You

Leave a Reply

Your email address will not be published. Required fields are marked *

  • why is ram so expensive

    Why Is RAM Suddenly So Expensive?

  • how to fix error code 0x800f0922 windows 11

    How to Fix Error Code 0x800f0922 in Windows 11

  • service outage message on Xbox

    What to Do With a Service Outage Message on Xbox

  • signs your hdd is failing

    Signs That Your HDD Is Failing

  • how to fix error code 0x800705b4 in windows 11

    How to Fix Error Code 0x800705b4 in Windows 11

profile pic

The Experts Behind Technipages

My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

Learn More

technipages logo white
linkedin icon

Technipages is part of Guiding Tech Media, a leading digital media publisher focused on helping people figure out technology. Learn more about our mission and team here.

© 2026 Guiding Tech Media All Rights Reserved

  • About Us
  • Contact
  • Terms of Use
  • Privacy Policy

© 2026 Guiding Tech Media All Rights Reserved

Information from your device can be used to personalize your ad experience.
Do not sell my personal information.

Last Updated on January 23, 2020 by Mitch Bartlett