How to Change local Accounts/Domain Admin Password by Windows PowerShell
This article covers computer Windows accounts and Windows domains as well as the important tool--PowerShell. A briefly introduce and tutorial will demonstrate to you how to use Windows PowerShell to change local user password and domain account passwords.
The local user account is different from the local domain account. We can create multiple local users for our PC and every account user can change their password themselves. A Windows domain is a combination of computers. A domain administrator manages all computers in the same domain with a permission password. Users of each computer may not be able to change the local domain account password while the domain admin does.
How can you change the password for local domains? Windows PowerShell can quickly change the local domain password and local users password. Windows PowerShell is an upgraded version of CMD (command shell), a powerful scripting language that system administrators can use to automatically perform tasks for managing operating systems (Linux, macOS, and Windows) and processes.
Steps to change local user password and domain password by Windows PowerShell
We will change the local user password and local domain password by Windows PowerShell. By the way, the Windows 10 system comes with PowerShell and installs it by default. Other early versions of the Windows system can go to the official website to download and install PowerShell.
Steps 1: Run PowerShell as an administrator. Right click at the Windows Start Menu icon. Then click the "Windows PowerShell (Admin)". If you can't find it from right-click, you can search it directly from the Start menu.
Steps 2: After the panel of the PowerShell command line shows up, you can surely change the password of the local users and domain. The following steps show you how to change the password of local user accounts/domain using PowerShell in Windows 10.
A. Change local user password by Windows PowerShell. In the following command, "Jack" is the username of the local user account. You should replace "******" with the password you want to set.
- $NewPassword = ConvertTo-SecureString "******" –AsPlainText –Force
- Set-LocalUser –Name Jack –Password $NewPassword
B. Change local domain password by Windows PowerShell. Similarly, the local domain password can also be changed by PowerShell. But you need to use the domain account firstly. Then execute the following command strings to change thelocal domain password in PowerShell:
- $NewPassword = ConvertTo-SecureString "******" –AsPlainText –Force
- Set-ADAccountPassword Bob –NewPassword $NewPassword -Reset
Steps 3: No errors appear, indicating that your operation is correct and your password of local users account and domain has been changed by Windows PowerShell.
Related Articles
- Windows 10 Login Password Lost What to Do?
- 3 ways to change administrator user account name in Windows 10
- Two Ways to Set User Account and Password for Windows 8.1
- Sign in Windows 10 with Local Account Instead of Microsoft Account
- 2 Ways to Create A Local Administrator Account in Windows 10 without Login