Skip to content

Instantly share code, notes, and snippets.

@saggie
Last active December 21, 2016 13:12
Show Gist options
  • Save saggie/93f1456c73181c82e8857e7e3959e2fe to your computer and use it in GitHub Desktop.
Save saggie/93f1456c73181c82e8857e7e3959e2fe to your computer and use it in GitHub Desktop.
Change password as is (for WinNT)
param([string]$UserName = "__your_username__",
[string]$Password = "__your_password__")
$computerName = hostname
$user = [ADSI]"WinNT://$computerName/$UserName,User"
$user.ChangePassword($Password, $Password)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment