Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Replace OU_NAME with the OU you want to apply
- 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