PowerShell: Retrieve password last set from AD User

0
726
PowerShell

Hello everyone, long time no update this blog. Today, I want to share the PowerShell command to retrieve the password last set from the AD User. Basically, we will use Get-ADUser Cmdlet to do this.

To get information about Get-ADUser command you can use PowerShell and type the following command

help Get-ADUser

Help Get-ADUser
Get-AdUser help

If you look on the Get-ADUser properties, there is Password last set information, password expired, password never expired status and password Not required status.

Get-ADUser -identity <username> -properties *

Password information
password information

So, the property that we will use are: PasswordLastSet, PasswordNeverExpires, PasswordNeverExpires, and PasswordNotRequired. Thus, we can run the command specifying these properties for result.

Get-ADUser -filter * -Properties passwordlastset, passwordneverexpires |ft Name, passwordlastset, Passwordneverexpires

Password Information
Password information

Below are additional links to Microsoft Technet references:

Get-ADUser can be found here: http://technet.microsoft.com/en-us/library/ee617241.aspx

Where cmdlet can be found here: http://technet.microsoft.com/en-us/library/ee177028.aspx

LEAVE A REPLY

Please enter your comment!
Please enter your name here