There are times when you need to make a password policy change that could affect your users, for example let’s say your password policy is currently set to 90 days to expiration, however you need to implement a new policy that is 60 days to expiration. You could have some users that are already past 60 days and implementing the new policy could immediately expire their account.

This script will enable you to set user account PWDLASTSET to today’s date, effective setting them all back to zero days. You should run this on your domain controller where the user accounts reside:

I am the original "CodeMonkey", founder, CISSP and a Sr. System Administrator with over 31 years experience. I specialize in PowerShell Scripting and Virtualization. I hope that everyone will enjoy the site and contribute to make this a great resource for everyone!
Author of "PowerShell Studio - A Comprehensive Guide"