AD PowerShell Script to see when a list of users last changed their passwords.
A lot of companies have their ADs setup so that a users password will expire normally once every 6 months.
But what happens if the company was to do a password audit?
How would you know for certain that the users whose passwords were cracked had actually changed their passwords after being told to do so?
But what happens if the company was to do a password audit?
How would you know for certain that the users whose passwords were cracked had actually changed their passwords after being told to do so?
Well quite simple you could ask them! But some would probably lie and say they did it when they most likely didn't.
So an easier way to do this would to use a PowerShell script that imports a CSV file of all the users, then checks their AD accounts as each AD account has an attribute called PasswordLastSet. Why ask users when you can just check their accounts, at least this way you wont be lied to at all.
Below is a screenshot of my code used to run this as well as the results that came back.
I am more than happy for anyone to use this code, but take no responsibility if you change/modify this code in anyway to complete harmful/malicious actions.
Below is a screenshot of my code used to run this as well as the results that came back.
I am more than happy for anyone to use this code, but take no responsibility if you change/modify this code in anyway to complete harmful/malicious actions.
Screenshot of my code:
Comments
Post a Comment