Advertisement
goezler

AD__Force a Group to Change Password

Jan 21st, 2021 (edited)
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. # Replace OU_NAME with the OU you want to apply
  2.  
  3. Get-ADuser -Filter {memberof -RecursiveMatch "OU_NAME"} | Set-ADuser -CannotChangePassword:$false -PasswordNeverExpires:$false -ChangePasswordAtLogon:$false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement