Oct 28 2023
I need help to assign through a script that creates accounts in bulk, force users from their first login to be forced to change passwords.I speak spanish, so my code has variables in spanish, but I need help please :(
Oct 29 2023
You can't force someone to change their password at next logon while also having "password never expires" set. You have to choose one or the other as those settings are mutually exclusive.
This behaviour has nothing to do with PowerShell. It is standard Windows behaviour for all accounts (domain or local).