Avatar of E=mc2
E=mc2
Flag for Canada asked on

Check login credentials for a computer user

I would like to check the login credentials for any user, to see if it's still the same password or if it has changed,.
A script would be beneficial or a program.
Scripting LanguagesWindows 10AzureWindows Server 2016

Avatar of undefined
Last Comment
E=mc2

8/22/2022 - Mon
Wesley Miller

Is this for a Local Account , Active Directory  , or Azure Account ?
E=mc2

ASKER
This is for Active Directory, on a Windows Server 2016
Michael B. Smith

This tells you when a password was last set for a given user:

$date = [DateTime]( get-aduser michael.smith -prop pwdLastSet ).pwdLastSet
$date = $date.AddYears( 1600 ).ToLocalTime()
$date

Open in new window

Your help has saved me hundreds of hours of internet surfing.
fblack61
E=mc2

ASKER
Thanks Michael, is this a script?  If yes, what type is it?
Michael B. Smith

Yes. That's PowerShell using the ActiveDirectory module.
Shaun Vermaak

Use DSInternals to pull the user hash and compare it against the previously found hash. pwdLastSet will not be accurate if someone bypasses security and use the same password
https://www.experts-exchange.com/articles/32998/Two-way-Password-Synchronization-from-one-Active-Directory-Domain-to-another-using-DSInternals.html
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
E=mc2

ASKER
Michael, the Powershell script does not work for me, however thank you.
ASKER CERTIFIED SOLUTION
E=mc2

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Shaun Vermaak

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
E=mc2

ASKER
I thought this worked but it does not.