Created
July 11, 2012 01:58
-
-
Save jstangroome/3087453 to your computer and use it in GitHub Desktop.
Change your own Active Directory password from PowerShell without any special permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
([adsi]'WinNT://domain/username,user').ChangePassword('oldpassword','newpassword') |
👍 I search for no dependency solution all day, It cool!
thanks a lot
Nice, thank you!
Thank you, it helped a lot :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An equivalent using a powershell cmdlet from the ActiveDirectory module:
Set-AdAccountPassword -Identity $AccountName -OldPassword (Read-Host -asSecureString "Enter the current password") -NewPassword (Read-Host -asSecureString "Enter the new password")
This cmdlet does not require a distinguishedname, so it is a bit easier to use.
More info: https://technet.microsoft.com/en-us/library/ee617261.aspx
I landed on your gist by researching this., I had a similar gist: https://gist.github.com/wim-beck/c402e54b47ab852701be800af6206073