Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Open In App
Next Article:
How to Find the Wi-Fi Password Using CMD in Windows
Next article icon

How to Change Windows Computer Password using CMD

Last Updated : 24 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

If you are a Windows user, one of the easiest ways to change your password is through the Command Prompt (CMD). This is especially helpful for users who prefer command-line tools or face issues accessing the standard settings menu.

In this article, we’ll guide you through the steps to change your Windows password using CMD, along with a few troubleshooting tips.

Prerequisites:

1. Administrative Rights

2. Familiar with the existing User Accounts

3. Backup the unsaved data

Using "net user" Command to Change the Password

Step 1: Open command prompt as Administrator

Go to the Search Menu, type CMD and select "Run as Administrator".

cmd-as-admin
cmd as admin

Step 2: Enter "net user" to fetch Password

net user <username> <newpassword>
Run-as-ADMIN
Run as ADMIN

Step 3: Run the command to change the password

net user [username] [newpassword]

Replace "[username]" with the username of the account whose password you want to change, and "[newpassword]" with the new password you want to set.

Set-password
Set password

Step 4: Reopen to Confirm

Close the Command Prompt and log in with the new password.

Change-password
Confirm to change the password

How to Privately Change a Password using CMD

Use this method to change the password for any particular user. Here's how you can do it:

Step 1: Go to Run & open Command Prompt

Go to the Search Menu, type CMD and select "Run as Administrator".

cmd-as-admin
cmd as admin

Step 2: List All Users to Choose

net user
Run-as-ADMIN
Run as ADMIN

Step 3: Change the password for any particular user

net user USERNAME NEWPASS

If your desired user name has more tan one word then follow this pattern:

For Example: Username - ALPHA GTR

net user "ALPHA GTR" NEWPASS 

Now, what if you're looking to remove a password using Command prompt? Let's see how you can get it done.

Using PowerShell - Additional Method (1)

Step 1: Go to Start and type PowerShell

Step 2: Type the following command to Change the Password

$username = 'UserNameHere'; $password = Read-Host -AsSecureString; net user $username $password

Note: Replace UserNameHere with the desired user account.

Step 3: Close the PowerShell > Restart > Log in

While in "Safe Mode" - Additional Method (2)

Step 1: Restart your PC and hit F8 several times to enter Windows Boot Mode

Step 2: Safe Mode with Command Prompt > net user

net user <username> <newpassword>

Step 3: Exit and Restart as usual

Steps to Remove a Password Using CMD

If you wish to remove the password for any particular account, you can set the password to blank by removing the password in the command line. Let's check it out:

Step 1: Go to Run & open Command Prompt

Go to Search Menu > type CMD > select "Run as Administrator"

Step 2: Run this Command to Remove Password

net user USERALPHA ""

Hence, this will clear your previously saved password for the account - USERALPHA

Tips & Tricks

While using CMD to change your password is usually a reliable method, there are a few common issues users may face:

1. Admin Access: Make sure to have admin access.

Without administration access, you won't be able to perform any of the above-mentioned action.

2. Invalid Username: Do remember the names of user accounts

net user command to list all the exact username.

3. Password Policy Restrictions: Domain restrictions or Specific Password Policies

Make sure the new password meets the system's password requirements.

Conclusion

Changing password in Windows helps in managing and maintaining privacy. By following the different methods and steps, you can easily reset your password or remove it from your Windows 10 or 11.

Also Read

  • How to Find the Wi-Fi Password Using CMD in Windows 11/10 ?
  • Useful CMD commands for daily use in Windows OS

Next Article
How to Find the Wi-Fi Password Using CMD in Windows

A

amitanshjqm0m
Improve
Article Tags :
  • TechTips
  • How To
  • Command Prompt

Similar Reads

  • How to Check Open Ports Using CMD in Windows?
    Open ports on your Windows computer act like doors for data-letting information in and out. While necessary for apps and services, unprotected ports can become security risks. Checking which ports are open helps you spot vulnerabilities, fix connection issues, and keep your system safe. Using Comman
    5 min read
  • How to Find the Wi-Fi Password Using CMD in Windows
    Forgotten your Wi-Fi password? Need to connect a new device but can’t recall the complex string of characters? You don’t have to scramble for that sticky note or reset your router just yet! Hidden within Windows is a powerful, built-in tool that lets you retrieve your Wi-Fi password quickly and secu
    8 min read
  • How to Change Wi-Fi Password?
    Changing your Wi-Fi password is a basic however significant step to upgrade your home network's security. Whether you're doing it to anticipate unauthorized get to or fair reviving your qualifications, it’s a fast assignment you can effectively oversee. In this direct, we’ll walk you through the pre
    5 min read
  • How to Find Connected WiFi Password in Windows?
    If you're connected to a WiFi network but can't remember the password, don't worry—Windows allows you to retrieve it easily. Whether you need to connect a new device or share the password with someone else, finding the connected WiFi password in Windows is a straightforward process. This guide will
    3 min read
  • How to Open Google Chrome Using CMD on Windows 11?
    Opening Google Chrome using CMD in Windows 11 is a convenient way to launch the browser without needing to use the graphical interface. Whether you're troubleshooting or simply prefer using the command line, this guide will show you how to run Chrome via CMD on Windows 11. The steps are easy and can
    4 min read
  • How to Reset MySQL Root Password in Windows Using CMD?
    Ever locked yourself out of your own database? It happens to the best of us! If you’ve forgotten your MySQL root password on a Windows machine, don’t panic. MySQL is a powerful database management system, and the root user has complete control over it meaning losing access can feel like a nightmare.
    4 min read
  • How to Reset Windows Admin Password?
    If you forgot your Windows administrator password, you might be locked out of your computer and unable to access your files and settings. However, there are some ways to reset your password without losing your data or reinstalling Windows. In this article, we will show you how to reset your Windows
    5 min read
  • How to use CMD for Python in Windows 10?
    Using the Command Prompt (CMD) is an effective way to interact with Python on your Windows 10 machine. Whether you're writing scripts, testing code, or running programs, mastering CMD for Python in Windows 10 is crucial. This article will guide you on how to run Python in CMD, execute scripts, and t
    4 min read
  • How to Remove RAR/WinRAR Password Using CMD?
    Forgetting the password to your RAR or WinRAR file can be incredibly frustrating, especially when you need to access important data quickly. Fortunately, Command Prompt in Windows provides a powerful and effective way to remove the password from your RAR/WinRAR files without the need for third-party
    5 min read
  • How to Use Command Prompt - Windows Command Prompt Guide
    Learn how to manually run the Command Prompt in different versions of Windows - The Windows Command Prompt (CMD) is a powerful tool that allows users to execute commands, automate tasks, and troubleshoot system issues efficiently. Whether you’re a beginner looking to learn basic CMD commands or an a
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences