Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param([string]$UserName = "__your_username__",
- [string]$Password = "__your_password__")
- "Changing password..."
- # execute
- $computerName = hostname
- $user = [ADSI]"WinNT://$computerName/$UserName,User"
- $user.ChangePassword($Password, $Password)
- "Completed."
- # pause
- Write-Host "Press any key to continue ..." -NoNewLine
- [Console]::ReadKey() | Out-Null
- [string]::Empty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement