Changing a Windows password from Command Prompt is fast, but it is important to understand what the command actually does. It does not reveal the current password. It replaces the existing password with a new one for a local Windows account. You must run Command Prompt with administrator rights. Use this method only on a computer you own or on an account you are authorized to manage.

Advertisment

Open Command Prompt with administrator access

Open the Start menu and type cmd. Right-click Command Prompt, then select Run as administrator.

Windows may show a User Account Control prompt. Select Yes to continue. If you open Command Prompt normally, the password change will usually fail with an access denied message.

Check the exact account name

Windows usernames do not always match the names shown on the sign-in screen. Before changing anything, list the local accounts on the PC.

Advertisment
net user

Press Enter and review the account names displayed in the window.

Screenshot 2026-07-30 153821

 Use the exact username in the next command.If the name contains spaces, place it inside quotation marks.

net user "TechTest" *

Change the password directly

The direct method includes the new password in the command. Replace username with the account name and newpassword with the password you want to set.

net user username newpassword

Press Enter. Windows should display a message confirming that the command completed successfully.

Advertisment

This approach is quick, but it exposes the password on screen. It may also appear in screenshots, screen recordings, support sessions, or copied command text. That makes it a poor choice on a shared computer.

Use the hidden password prompt

The safer method keeps the password out of the command itself.

net user username *

Press Enter. Windows will ask you to enter a new password and then type it again for confirmation.

Nothing will appear while you type. Windows will not show letters, dots, or asterisks, but it is still receiving the input. Type carefully and press Enter after each entry.

Advertisment

For most users, this is the better option because it reduces the chance of exposing the new password.

Confirm the password change

After Windows reports that the command completed successfully, sign out or lock the PC. Test the new password before closing important files or ending an administrator support session.

Screenshot 2026-07-30 154233

If Windows cannot find the account, run net user again and check the spelling. If the password is rejected, it may not meet the computer’s length, history, or complexity policy. A successful reset immediately replaces the old password. It does not recover, display, or decode the previous one. On work or school computers, password changes may also be logged and reviewed by the organization’s information technology team.

Advertisment

More For You

Windows 11 Insider builds need a certificate update by August 11 

This ChatGPT Image 2.0 anime test started simple, then the manga page took over

What nobody tells you about using AI on your computer

I tried Microsoft PC Manager and Boost is not the best part