Advertisement
Guest User

Untitled

a guest
Dec 20th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. param([string]$UserName = "__your_username__",
  2. [string]$Password = "__your_password__")
  3.  
  4. "Changing password..."
  5.  
  6. # execute
  7. $computerName = hostname
  8. $user = [ADSI]"WinNT://$computerName/$UserName,User"
  9. $user.ChangePassword($Password, $Password)
  10.  
  11. "Completed."
  12.  
  13. # pause
  14. Write-Host "Press any key to continue ..." -NoNewLine
  15. [Console]::ReadKey() | Out-Null
  16. [string]::Empty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement