Powershell to set AD user password to never Expire

 Below powershell command to set AD user to password never expires

 Set-QADUser -Identity “domain\account” -ObjectAttributes @{useraccountcontrol=65536}

If you have list of users then you can put the file into the txt file and use powershell to set all the required user to password never expires

 get-content “c:\users.txt” | Set-QADUser -ObjectAttributes @{useraccountcontrol=65536}

3 thoughts on “Powershell to set AD user password to never Expire

Leave a comment