Skip to content

vic.gov.au

  • Sample Page
5 Steps to Reset Your Password with Cmd

5 Steps to Reset Your Password with Cmd

July 23, 2025April 16, 2025 by sadmin

5 Steps to Reset Your Password with Cmd

Have you ever ever forgotten your Home windows password and questioned easy methods to reset it with no need to undergo the effort of contacting help or reinstalling your working system? In that case, then this text is for you. On this article, we are going to information you thru the step-by-step means of resetting your Home windows password utilizing the Command Immediate (CMD). This methodology is straightforward, efficient, and may be executed in just some minutes.

Earlier than we start, it is necessary to notice that this methodology solely works for native person accounts. If you’re utilizing a Microsoft account to log in to Home windows, you will have to make use of a distinct methodology to reset your password. Moreover, you will have to have entry to the Administrator account in your pc so as to carry out these steps. If you happen to shouldn’t have entry to the Administrator account, you could have to contact your system administrator for help.

Now that you’ve got gathered the required data, let’s get began with the steps on easy methods to reset password with Cmd. First, you will have to open the Command Immediate. To do that, press the Home windows key + R and kind “cmd” into the Run dialog field. Then, click on OK. As soon as the Command Immediate is open, you will have to sort the next command and press Enter: web person username new_password. Change “username” together with your username and “new_password” together with your new password. For instance, in case your username is “John” and your new password is “password123”, you’d sort the next command: web person John password123. After getting entered the command, press Enter and your password can be reset. Now you can shut the Command Immediate and log in to Home windows utilizing your new password.

Launch Command Immediate

Command Immediate is a command-line interface that permits you to execute instructions in Home windows working methods. To launch Command Immediate, observe these steps:

1. Open the Begin menu

Click on the Home windows icon within the bottom-left nook of your display or press the Home windows key in your keyboard. Within the search bar, sort “command immediate”.

2. Proper-click Command Immediate

When Command Immediate seems within the search outcomes, right-click it and choose “Run as administrator”. This may launch Command Immediate with elevated privileges, which is important for resetting your password.

3. Enter the online person command

Within the Command Immediate window, sort the next command and press Enter:

web person [username] [new password]

Change “[username]” together with your Home windows username, and change “[new password]” together with your desired new password. For instance, in case your username is “John” and also you need to set your password to “123456”, you’d sort the next command:

web person John 123456

If you wish to reset the password for one more person in your pc, you will have to specify their username as an alternative of your individual.

4. Confirm the password change

After coming into the command, you need to see a message indicating that the password has been efficiently reset. To confirm the change, log off of your Home windows account and log again in utilizing your new password.

Navigate to Person Profile Listing

To navigate to the person profile listing, observe these steps:

  1. Open the Begin menu and kind “cmd”.
  2. Proper-click on “Command Immediate” and choose “Run as administrator”.
  3. Within the Command Immediate window, sort the next command and press Enter:

    cd %userprofile%

    This may take you to the person profile listing. Now you can reset the password for the present person.

    As soon as you might be within the person profile listing, you’ll be able to reset the password for the present person utilizing the next steps:

    1. Kind the next command and press Enter:

      web person username newpassword

      The place “username” is the identify of the person account you need to reset the password for and “newpassword” is the brand new password you need to set.

    2. Verify the brand new password by typing it once more and urgent Enter.
    3. The password for the person account has now been reset. Now you can log in to the person account utilizing the brand new password.

      Rename SAM File

      Now that you’ve got booted into the Home windows Restoration Atmosphere, you might want to rename the SAM file. This file is situated within the WindowsSystem32config listing. To rename the file, you should use the next command:

      ren %windirpercentsystem32configSAM SAM.bak

      This command will rename the SAM file to SAM.bak. Now you can shut the Command Immediate window and restart your pc. Home windows will now boot into Secure Mode and it is possible for you to to reset your password.

      Warning

      Renaming the SAM file is a dangerous operation. If you happen to make a mistake, you would corrupt your Home windows set up. It is suggested that you simply solely carry out this operation in case you are assured in your talents.

      Essential

      The SAM file is a delicate file. It is suggested that you simply again up the file earlier than you rename it. You are able to do this by copying the file to a USB drive or one other location.

      Command Description
      ren %windirpercentsystem32configSAM SAM.bak Renames the SAM file to SAM.bak

      Boot into Home windows Restoration Atmosphere

      Step 1: Insert your Home windows set up media (USB/DVD).

      Step 2: Restart your pc.

      Step 3: Press the suitable key (e.g., F12) to enter the boot menu.


      Step 4: Choose the USB/DVD drive as your boot gadget.

      Step 5: On the “Set up Home windows” display, click on “Restore your pc.”

      Step 6: Within the “Select an possibility” display, choose “Troubleshoot.”

      Step 7: Click on “Superior Choices.”

      Step 8: Choose “Command Immediate.”

      The best way to Reset Password Utilizing Cmd

      Step 1: As soon as the Command Immediate window opens, sort the next command and press Enter:
      web person [username] [new_password]

      For instance, web person administrator NewPassword123

      Step 2: It’s best to obtain a message confirming that the password has been modified efficiently.

      Step 3: Kind exit and press Enter to shut the Command Immediate.

      Step 4: Click on “Proceed” to restart your pc.

      Be aware: If you happen to have no idea the administrator username, you should use the next command to seek out it:
      web person

      This may output an inventory of all person accounts on the system.

      Reset Password Utilizing Secure Mode

      Step 1: Restart your pc.

      Step 2: Press and maintain the Shift key whereas clicking the Restart button.

      Step 3: Within the “Select an possibility” display, choose “Troubleshoot.”

      Step 4: Click on “Superior Choices.”

      Step 5: Click on “Startup Settings.”

      Step 6: Click on “Restart.”

      Step 7: After your pc restarts, you will note an inventory of startup choices.

      Step 8: Select “Secure Mode with Command Immediate.”

      Step 9: Comply with the steps within the earlier part to reset your password utilizing the Command Immediate.

      Open Command Immediate from Restoration Atmosphere

      To reset your password utilizing the command immediate from the restoration surroundings, you may have to have a bootable USB drive or DVD containing the Home windows set up media. Listed here are the steps:

      1. Insert the bootable USB drive or DVD into your pc and restart it.
      2. On the Home windows Setup display, select your language and different preferences, then click on “Restore your pc”.
      3. On the “Select an possibility” display, click on “Troubleshoot”.
      4. On the “System Restoration Choices” display, click on “Command Immediate”.
      Command Description
      reg load HKLMSAM c:windowssystem32configSAM Masses the registry hive for the Safety Account Supervisor (SAM) database.
      cd WindowsSystem32config Navigates to the listing the place the SAM database is situated.
      ren SAM SAM.bak Renames the present SAM database to SAM.bak.
      copy c:windowsrepairSAM c:windowssystem32configSAM Copies the default SAM database from the restore folder to the Config folder.
      reg unload HKLMSAM Unloads the SAM registry hive.
      exit Exits the Command Immediate and restarts the pc.

      As soon as your pc restarts, you need to be capable to log in with the default administrator account. You possibly can then create a brand new password in your unique person account.

      Reset Administrator Password

      To reset the administrator password utilizing the command immediate, observe these steps:

      1. Boot into Restoration Mode

      Begin your pc and press the suitable key to enter the BIOS settings (often F2, F10, or Delete).

      2. Change Boot Order

      Change the boot order in order that your pc boots from the Home windows set up media.

      3. Boot from Set up Media

      Insert the Home windows set up media and restart your pc. Comply with the on-screen directions in addition from the media.

      4. Choose Language and Choices

      Choose the specified language, time and forex format, and keyboard enter methodology.

      5. Click on “Restore Your Pc”

      On the Home windows Setup display, click on on the “Restore your pc” possibility within the bottom-left nook.

      6. Entry Command Immediate

      Within the Select an possibility display, choose “Troubleshoot” > “Superior choices” > “Command Immediate”.

      Restart into Regular Mode

      As soon as you’ve got accomplished resetting your password with Command Immediate, you may have to restart your pc into regular mode to check if the adjustments have been profitable.

      Step 7: Restart Your Pc

      This is a step-by-step information on easy methods to restart your pc into regular mode:

      1. Click on the Begin button within the backside left nook of your display.

      2. Choose the Energy icon.

      3. Click on the Restart possibility.

      4. Wait in your pc to restart.

      5. As soon as your pc has restarted, attempt logging in together with your new password.

      If you’ll be able to log in together with your new password, then the reset was profitable. If you’re nonetheless unable to log in, then you could have to attempt a distinct reset methodology.

      Tip: Earlier than restarting your pc, it is a good suggestion to save lots of any open work or information that you’ll have.

      Allow Constructed-in Administrator Account

      Earlier than you’ll be able to reset your password utilizing Cmd, you might want to allow the built-in administrator account. This is easy methods to do it:

      1. Boot into Secure Mode

      Restart your pc and press the F8 key repeatedly till you see the Home windows Superior Choices Menu. Choose Secure Mode and press Enter.

      2. Open Command Immediate

      When you’re in Secure Mode, press Home windows Key + R to open the Run dialog field. Kind cmd and press Enter.

      3. Allow Administrator Account

      Within the Command Immediate window, sort the next command and press Enter:

      web person administrator /lively:sure

      4. Set a New Password for the Administrator Account

      As soon as the administrator account is enabled, you’ll be able to set a brand new password for it. Kind the next command and press Enter:

      web person administrator [new_password]

      5. Log in as Administrator

      Restart your pc and log in utilizing the administrator account and the brand new password you set.

      6. Open Command Immediate as Administrator

      When you’re logged in as administrator, press Home windows Key + R to open the Run dialog field. Kind cmd and press Ctrl + Shift + Enter to open Command Immediate as administrator.

      7. Change Person’s Password

      Within the Command Immediate window, sort the next command and press Enter to alter the password for any person account:

      web person [username] [new_password]

      8. Reset Native Account Password Utilizing Web Person Command

      To reset the password of a neighborhood account utilizing the Web Person command, observe these steps:

      a) Open Command Immediate as Administrator: As defined in step 6, open Command Immediate with elevated privileges.

      b) Run the Web Person Command: Within the Command Immediate window, sort the next command and press Enter:

      web person

      Change with the username of the native account you need to reset the password for, and with the brand new password you need to set.

      c) Instance: To reset the password of a neighborhood account named "John" to "P@ssw0rd!", sort the next command and press Enter:

      web person John P@ssw0rd!

      d) Confirm Password Reset: After executing the command, you'll be able to confirm that the password has been reset by logging into the native account utilizing the brand new password.

      Disable Constructed-in Administrator Account

      The built-in Administrator account is a extremely privileged account that may make adjustments to the system that might compromise its safety. For that reason, it's typically advisable to disable the built-in Administrator account and create a brand new person account with restricted privileges for on a regular basis use.

      Steps to Disable Constructed-in Administrator Account

      To disable the built-in Administrator account, observe these steps:

      1. Press Home windows Key + R to open the Run dialog field.
      2. Kind "web person administrator /lively:no" within the Run dialog field and press Enter.
      3. The built-in Administrator account will now be disabled.

      Further Issues

      When disabling the built-in Administrator account, preserve the next in thoughts:

      • It's essential to have another person account with administrative privileges to disable the built-in Administrator account.
      • If you happen to disable the built-in Administrator account and lose entry to your main person account, you could want to make use of a Home windows restoration disk to reset the password in your main person account or re-enable the built-in Administrator account.
      • Disabling the built-in Administrator account is a safety measure and shouldn't have an effect on the traditional functioning of your pc.
      Command Description
      web person administrator /lively:sure Allows the built-in Administrator account
      web person administrator /lively:no Disables the built-in Administrator account

      Delete Momentary Information

      To delete non permanent information utilizing Cmd, observe these steps:

      1. Open Command Immediate

      Press Home windows key + R to open the Run dialog field, sort "cmd" and press Enter.

      2. Navigate to the Momentary Folder

      Kind the next command and press Enter:

      cd %temp%

      3. Delete Momentary Information

      Kind the next command and press Enter to delete all non permanent information and folders:

      del * /s /q

      Alternatively, you should use the next command to delete non permanent information which can be older than 24 hours:

      forfiles /p %temp% /s /m * /d -1 /c "cmd /c del @file"

      4. Verify Deletion

      A affirmation message will seem. Kind "Y" and press Enter to verify the deletion.

      5. Repeat for Different Customers

      When you've got a number of person accounts in your pc, you could have to repeat this course of for every account.

      6. Empty Recycle Bin

      After deleting the non permanent information, empty the Recycle Bin to completely take away them out of your pc.

      7. Restart Pc

      Restart your pc to finish the method.

      8. Test Disk House

      After restarting, examine your obtainable disk house to see if the non permanent information have been efficiently deleted.

      9. Schedule Automated Cleanup

      To mechanically delete non permanent information regularly, create a scheduled process in Job Scheduler.

      10. Superior Strategies Utilizing PowerShell

      For extra superior choices, you should use PowerShell instructions to delete non permanent information. Listed here are some examples:

      Command Description
      Get-ChildItem -Path $env:TEMP -Recurse | Take away-Merchandise -Drive Deletes all information and folders within the non permanent folder
      Take away-Merchandise $env:TEMP* -Recurse -Drive Identical as above
      Get-ChildItem -Path $env:TEMP -Filter *.tmp -Recurse | Take away-Merchandise -Drive Deletes solely information with the ".tmp" extension

      The best way to Reset Password with CMD

      In case you overlook your Home windows password, you'll be able to simply reset it utilizing the Command Immediate (CMD). This is a step-by-step information:

      1. Restart your pc and press F8 earlier than the Home windows emblem seems.
      2. Choose "Secure Mode with Command Immediate" from the boot choices.
      3. On the Command Immediate, sort the next command and press Enter:
        web person [username] [new password]
      4. Change "[username]" together with your precise username and "[new password]" with the brand new password you need to set.
      5. Press Enter once more to execute the command.
      6. Restart your pc usually and log in with the brand new password.

      Individuals Additionally Ask

      How do I open CMD as administrator?

      To open CMD as an administrator, observe these steps:

      1. Click on on the Begin menu.
      2. Kind "cmd" within the search bar.
      3. Proper-click on "Command Immediate" and choose "Run as administrator".

      How do I reset a forgotten password with out CMD?

      If you do not have entry to CMD, you'll be able to reset your password through the use of the Microsoft account password reset device. Go to the Microsoft account password reset web page and observe the directions.

Categories howto Tags cmd, command-prompt, forgot-password, local-user-account, network-user-account, reset-password, troubleshooting, windows
10 Biggest Trends to Watch at Concur Conference 2025
How To Get Nipple Rings Out
© 2025 vic.gov.au • Built with GeneratePress