Windows – Change (not reset!) the own domain user password on command prompt

command linedomainpasswordswindows

I've read about the command net user <username> <password> /domain to "change" my domain account password. But this isn't asking for my current password, and I have the impression (although nobody warned me explicitly) that it really doesn't normally change/update my password, but instead reset it. This would mean that I lose access to all encrypted things bound to my credentials, e. g. EFS.

How can I change my password for a domain account on the command line without losing crypto access? I'm looking for a full functional equivalent of the Ctrl+Alt+Delete/Change Password GUI for automation. It should also accept the current password as command line parameter if necessary.

This is for Windows 7 and a similar-aged or more current domain controller. I have local administrator privilege but not for the domain, but I imagine that it shouldn't be necessary to change my own user password.

Best Answer

It isn't asking for your current password because probably you run command/script as yourself, so it uses your credentials.

You can use PowerShell Set-ADAccountPassword for this, if you want more powerful feature to change your password. You can also get credentials from user with Get-Credential.

You can use them after installing RSAT (Remote Server Admin Tools) and importing module through command Import-Module ActiveDirectory.

Related Question