Advertisement
Guest User

Untitled

a guest
Nov 1st, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # SET PRE-DEFINED PASSWORD HERE:
  2. $defaultNewPassword = "password123"
  3.  
  4. Write-Host "The Lowry Quick Password Rester v1.0.0"
  5. Write-Host "--------------------------------------"
  6. Write-Host ""
  7. $username = Read-Host -Prompt 'Please type in the username: '
  8. $newpassword = ConvertTo-SecureString -String $defaultNewPassword -AsPlainText –Force
  9. Set-ADAccountPassword jfrost -NewPassword $newpwd -Reset -PassThru | Set-ADuser -ChangePasswordAtLogon $True
  10. Write-Host $username + "'s password has been changed to: " + $defaultNewPassword
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement