Powershell force password change

For various reasons you might need to force all of the users in a particular OU in your domain to be forced to change their password.

import-csv -path D:\tmp\users.csv | foreach-object {get-aduser -SearchBase "OU=Sales,OU=Users,DC=Corp,DC=Contoso,DC=Com" -Filter "Name -like '*$($_.name)*'" | set-aduser -ChangePasswordAtLogon $True}

The location of D:\tmp\users.csv should be changed to where ever you save your csv file. Also the -SearchBase path should be change to match your directory structure.

The users.csv file looked like this: