Force all users to change password using powershell
There can be times (maybe the security policy of the company has changed) when you want all users to change their passwords.
Using PowerShell this can be done in one command.
Get-ADUser -Filter * -SearchBase "ou=TestOU,dc=theitcommunity,dc=com" | Set-ADUser -ChangePasswordAtLogon $true
and press enter.
You will have to change theitcommunity to the name of your domain and TestOU to the name of the OU where your users are in.
Note: It is recommended that you first create a new OU, move one user into it and test the script there.
Was this article helpful? Then please donate to keep The IT Community alive...
If you found this article helpful please share it, comment and help others by writing your own article.
Translate this page:
Articles found in the same category: