Well the password expiration is based on the policies set by your GPO, I don’t think it’s possible to arbitrarily add 30 days. You can at best “reset” the timer for when the password was last set, which would extend the password expiration for the interval defined by your domain.
Although this isn’t really a Powershell related issue. You can use
Set-ADUser to adjust the
pwdlastset attribute. There are instructions for this elsewhere, but you should set it to 0 and then -1 .
You may be able to use a fine-grained password policy to target those accounts you need to be extended for 30 days. I would not be able to instruct you on the specifics for how to do this though.
This reply was modified 2 months, 3 weeks ago by Phatmandrake.