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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s