To set or change your password in Windows 10, open Settings, select Accounts > Sign-in options, then select Password > Change and follow the instructions. You need to enter your old password to create a new one. The same path works whether you sign in with a Microsoft account or a local account.
Applies to: Windows 10 (Microsoft accounts and local accounts). Checked against Microsoft Support and Microsoft Learn on October 6, 2026.
Before you start: which kind of account do you have?
Windows 10 has two kinds of personal accounts, and the password behaves differently for each.
- Microsoft account. You sign in with an email address. The password belongs to the online account, so changing it changes the password you use for that Microsoft account everywhere, not only on this PC.
- Local account. The user name and password exist only on this one computer. There is no online reset, so recovery depends on the security questions set up with the account, a password reset disk, or another administrator on the same PC.
Two more things are worth knowing before you change anything:
- A PIN is not a password. Microsoft states that the PIN you use to access your device is different from your Microsoft account password. If you type a short PIN at the sign-in screen, see the PIN section below.
- Windows 10 is out of support. Microsoft ended support for Windows 10 on October 14, 2025. The software still works and these account settings are still there, but the PC no longer receives security fixes unless it is enrolled in the Extended Security Updates program, so a good password matters more than ever. Microsoft explains the details on its Windows 10 end of support page.
Set or change your password in Settings
This is the method Microsoft documents for both account types. You must be signed in to the account whose password you want to change.
- Open the Settings app. The main Settings window opens with a list of categories.
- Select Accounts. The Accounts page shows your own account details and a list of account sections.
- Select Sign-in options. Windows lists the ways you can sign in to this PC, including a PIN and a password.
- Select Password, then select Change. Windows starts the password change and shows its instructions.
- Enter your old password when asked. Microsoft notes that you need the old password to create a new one.
- Enter the new password and follow the remaining instructions on screen. When the last screen closes, the new password is active.

If your local account has no password yet, the Password section may show an option to create one in place of Change. Microsoft’s instructions describe only the Change path, so if your screen differs, use the Command Prompt method below. It assigns a password to a local account whether or not it already has one.
Microsoft’s own instructions are on its pages for changing or resetting a local account password and changing or resetting a Microsoft account password in Windows.
Change a Microsoft account password online
Because a Microsoft account password lives online, you can also change it from a web browser on any device. Use this route when you are away from the PC.
- Go to account.microsoft.com and sign in with the account you use on the PC.
- Open Security and choose Change Password.
- Enter your new password, then select Save.
The page also has an optional setting that prompts you to update the password every 72 days. Leave it off unless you want regular reminders. The next time you sign in to the Windows 10 PC, use the new password.
Set a password for another account on the PC
If you are an administrator, you can set the password for another local account, such as a child’s account or an account whose owner has forgotten the password. Microsoft documents this in Computer Management.
- Open Computer Management. Its window opens with a tree of tools on the left.
- Expand Local Users and Groups, then select Users. The accounts on this PC are listed in the middle of the window.
- Right-click the user whose password you want to set and select Set Password….
- Enter the new password and confirm it. The account uses the new password at its next sign-in.
Use this only for local accounts. A Microsoft account password is changed by its owner in Settings or online. If you need a separate account first, see our guide on how to create a local account on Windows 10.
Set a local account password with Command Prompt
The net user command assigns or changes the password for a local account in one line. Open Command Prompt as an administrator first.
- Type net user and press Enter. Windows lists the user accounts on the PC so you can check the exact user name.
- Type net user Sam * and press Enter, replacing Sam with the user name. The asterisk tells Windows to prompt for the password.
- Type the new password at the prompt and press Enter. The password isn’t displayed while you type it. That is normal.
Microsoft’s net user reference says a password can have as many as 127 characters and must meet the minimum password length that is set on the PC.
Set a local account password with PowerShell
Windows PowerShell has a command for local accounts called Set-LocalUser. Open PowerShell as an administrator, then run these three lines one at a time, replacing Sam with the user name:
- Type $Password = Read-Host -AsSecureString and press Enter, then type the new password and press Enter again. PowerShell stores it as a secure string instead of plain text.
- Type $UserAccount = Get-LocalUser -Name “Sam” and press Enter. This picks the account to change.
- Type $UserAccount | Set-LocalUser -Password $Password and press Enter. This sets the new password on that account.
Microsoft’s Set-LocalUser documentation warns not to set a password this way if the user account is connected to a Microsoft account.
Set up or change a PIN instead
A PIN is a second way to sign in. Microsoft describes it as tied to one device, which means a PIN set on this PC does not unlock anything else. Your account password still exists underneath it.
- Open Settings and select Accounts > Sign-in options.
- Select PIN (Windows Hello).
- To create a PIN, select Set up. To replace an existing one, select Change PIN. Follow the instructions on screen.
If you forgot the PIN, select I forgot my PIN in the same place to verify your account and create a new one. Microsoft’s page on changing or resetting your PIN has the full steps.
Check that the new password works
Test the password right away, while you still remember it.
- Press Windows key + L. This locks the PC and leaves your apps open.
- At the sign-in screen, enter the new password. If the PC is set to ask for a PIN, choose the password option on the sign-in screen first.
- If the desktop comes back, the change worked.
There is no undo button for a password change. To go back to an earlier password, or to pick a better one, repeat the Settings steps and enter the current password when asked.
Prepare for a forgotten password
Local accounts have no online reset, so set up a safety net now. Microsoft documents a password reset disk, which is a USB flash drive that lets you reset a local account password if you forget it.
- Sign in with the local account and insert a USB flash drive.
- Type Control Panel in the search box on the taskbar and open it.
- In the Control Panel search box, type create password reset.
- Select Create a password reset disk and follow the wizard.
- Remove the drive and keep it somewhere safe.
You do not need to make a new disk when you change the password later. This option is not available for Microsoft accounts. See Microsoft’s page on creating a password reset disk for more detail.
Troubleshooting
I don’t remember the old password
You can still use the Settings route. During the steps above, a Microsoft account offers Forgot my current password, which lets you verify your account and create a new one. A local account offers I forgot my password, which asks your security questions and then lets you enter a new password.
I’m locked out at the sign-in screen
For a Microsoft account, select I forgot my password at the sign-in screen. For a local account, select the arrow next to the password box, select OK, then select Reset password and answer the security questions, or use your password reset disk. Our guide to recovering a Windows 10 administrator password safely covers each supported option in order. Microsoft states that its support agents cannot retrieve or circumvent a lost password, so the recovery details on the account are what count.
The Change button is missing or greyed out
Make sure you are signed in to the account you want to change, because the Settings route only changes your own password. On a PC that belongs to an employer or school, sign-in rules are usually set by the organization, so ask the IT administrator to change or reset the password instead of trying to work around it.
Windows rejects the new password at the command line
The password must meet the minimum length set on the PC and can be no longer than 127 characters. Choose a longer password and run the command again.
PowerShell does not recognize Set-LocalUser
Microsoft notes that the local accounts module is not available in 32-bit PowerShell on a 64-bit system. Close the window and open the regular 64-bit Windows PowerShell.
Nobody on the PC can sign in as an administrator
If no administrator account is reachable and no recovery option works, Microsoft’s guidance is to reset the Windows device. Treat that as the last resort and save any files you can still reach first.
Frequently asked questions
Is changing my PIN the same as changing my password?
No. The PIN and the password are separate. Changing the PIN under PIN (Windows Hello) leaves the account password as it was, and changing the password leaves the PIN alone.
Does changing my Microsoft account password on the PC change it everywhere?
Yes. The password belongs to the Microsoft account, so the new one applies wherever you sign in with that account.
Can I set a password for someone else’s account?
An administrator can set the password of another local account in Computer Management, with net user, or with PowerShell. Only the owner can change a Microsoft account password.
How long can a Windows 10 local account password be?
Microsoft’s command reference gives a maximum of 127 characters. The minimum is whatever length is set on that PC.
Do I need the internet to change my password?
A local account exists only on the PC, so its password does not depend on an online service. A Microsoft account password is an online password, so plan to be connected when you change it.
Do these steps work on Windows 11?
Microsoft lists the same Accounts > Sign-in options > Password > Change path for both Windows 10 and Windows 11.
Next, lock the PC with Windows key + L and sign back in with the new password, then create a password reset disk if you use a local account.
Related: How to change your computer password on Windows 10.
Related: set a password on a Windows 11 HP laptop.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.