How to add password to local account on Windows 10

If you need to add a new password to a local account, you can use Settings, PowerShell, Command Prompt, Computer Management, Control Panel to complete the task on Windows 10, and here's how.

Windows 10 add password local account
Windows 10 add password local account

On Windows 10, you can add a password to a local account in at least five different ways using the Settings app, PowerShell, Command Prompt, Computer Management, and even from the Control Panel.

The ability to add a password always comes in handy to secure a local account in case you never configured one. Or you can also use the Windows 10 options to change the account password in case it’s been compromised, or it’s easy to guess and you want to set a more complex password.

In this guide, you’ll learn the different ways to create a password for a local account on Windows 10.

Add password to local account using Settings

To add a password to a local account, use these steps:

  1. Open Settings on Windows 10.

  2. Click on Accounts.

  3. Click on Sign-in options.

  4. Under the “Manage how you sign in to your device” section, select the Password option.

  5. Click the Add button.

    Settings add password option
    Settings add password option
  6. Create a new password for the local account.

    Create local account password
    Create local account password
  7. Confirm a password hint.

  8. Click the Next button.

  9. Click the Finish button.

  10. (Optional) Click the Update your security questions option to set up a way to reset the password in case you forget it.

Once you complete the steps, sign out and while signing back in, you’ll need to use the new password.

Add password to local account using Computer Management

To create a new password for a local account with Computer Management, use these steps:

  1. Open Start.

  2. Search for Computer Management and click the top result to open the console.

  3. Expand the Local Users and Groups branch.

  4. Select the Users folder.

  5. Right-click the user and select the Set Password option.

    Computer Management set password option
    Computer Management set password option
  6. Click the Proceed button.

  7. Create the new password for the local account on Windows 10.

    Set password for local account
    Set password for local account
  8. Click the OK button.

After you complete the steps, the new password will be set in the account.

Add password to local account using Command Prompt

To add a password to a local account with Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to list all the available users and press Enter: net users

    net users
  4. Type the following command to add a password for the local account and press Enter:

    net user “LocalAccount” “Password”

    Command Prompt add password to local account
    Command Prompt add password to local account

In the command, make sure to change LocalAccount for the actual name of the user and Password for the password that you want to use.

Once you complete the steps, the password will be added to the local account.

Add password to local account using PowerShell

To create a password for an account with PowerShell, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the top result, and select Run as administrator.

  3. Type the following command to list all the available accounts and press Enter:

    Get-LocalUser

    PowerShell Get-LocalUser command
    PowerShell Get-LocalUser command
  4. Type the following command to create and store the new password inside of a variable and press Enter:

    $Password = Read-Host "Enter the new password" -AsSecureString
  5. Type the new password for the account and press Enter.

  6. Type the following command and press Enter on each line to apply the new password to the local account:

    $UserAccount = Get-LocalUser -Name "admin"
    $UserAccount | Set-LocalUser -Password $Password

    In the second command, make sure to replace “admin” with the name of the account that you want to reset its password.

    PowerShell commands to change an account password
    PowerShell commands to change an account password

In the second command, make sure to replace “admin” with the name of the account that you want to reset its password.

After you complete the steps, you can start using the local account with the new password.

Add password to local account using Control Panel

It’s also possible to add a password to a local account using Control Panel, but the option is only available when configuring the account from another account.

To add a new account password using Control Panel, use these steps:

  1. Open Control Panel.

  2. Click on User Accounts.

  3. Click on User Accounts again.

  4. Click the Manage another account option.

    Manage another account option
    Manage another account option
  5. Select the local account.

  6. Click the Create a password option.

    Create password option
    Create password option
  7. Confirm the new password.

    Control Panel local account password
    Control Panel local account password
  8. Confirm the hint password.

  9. Click the Create password button.

Once you complete the steps, you can login to the local account using the new password.

About the author

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He is also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me.