0% found this document useful (0 votes)
27 views

How To Change Windows Password Using Command Line or PowerShell

Uploaded by

roylopez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

How To Change Windows Password Using Command Line or PowerShell

Uploaded by

roylopez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

How to Change Windows

Password Using Command


Line or PowerShell
December 20, 2018 by Dan Kukarsky
(https://blog.techinline.com/author/danila/)

Windows makes it simple for any user to change their


password from the standard settings menu. But what if
they forget it, or even get stuck on the login screen
with their local administrator account disabled?

If this is the case, you can connect to their machine


using a remote desktop tool such as SetMe
(https://www.setme.net/?
utm_source=blog&utm_medium=win_pass), and
assign a new Windows password via Command Line or
PowerShell.

Here’s how you can do that.

Change Windows password for a local user


1. Run Command Prompt as an administrator
(https://blog.techinline.com/2019/08/14/run-
command-prompt-as-administrator-windows-
10/), or start Windows 10 in safe mode with
Command Prompt
(https://www.bleepingcomputer.com/tutorials/ho
w-to-start-windows-10-in-safe-mode-with-
command-prompt/) at the login screen.
2. Type net user USERNAME NEWPASS where you
need to replace USERNAME and NEWPASS with
the actual username and a new password for this
user.
3. If the actual username consists of more than two
words, place it inside quotation marks.
4. Hit Enter.

For extra security, you may want to use the following


command: net user USERNAME *. Windows will
then prompt you to enter the password twice. This
way nobody around you will be able to see the
password on your screen.

Looking for an easy solution to fix Windows issues


remotely? SetMe is a remote support powerhouse that
allows you to securely connect to any remote PC in just
3 easy steps.

See how it works (https://www.setme.net/?


utm_source=blog&utm_medium=win_pass)

Change Windows password for a domain


user
1. Run Command Prompt as an administrator, or
start Windows 10 in safe mode with Command
Prompt at the login screen.
2. Type net user /domain USERNAME NEWPASS.
Replace USERNAME and NEWPASS with the
actual username and a new password for this
user.
3. If the actual username consists of more than two
words, place it inside quotation marks.
4. Hit Enter.

Change Windows password for a domain


user with PowerShell
1. Run PowerShell as an administrator
(https://www.thewindowsclub.com/how-to-open-
an-elevated-powershell-prompt-in-windows-10).
2. Use the Set-ADAccountPassword cmdlet to
change the user’s password:
Set-ADAccountPassword -Identity $user
-Reset -NewPassword (ConvertTo-
SecureString -AsPlainText "$newPass"
-Force)
Replace $user and $newPass with the actual
username and a new password.
3. Hit Enter.

Did you find this article helpful? See more Windows


tips & tricks
(https://blog.techinline.com/category/tips-
tricks/windows-tips/) on our blog and follow us on
Facebook (https://www.facebook.com/techinlineLtd),
Twitter (https://twitter.com/techinline) or LinkedIn
(https://www.linkedin.com/company/techinline) to get
all the latest posts and updates as they happen.

Check out SetMe, our brand new remote desktop


solution that makes connecting to remote computers
easier than ever before, and be sure to sign up for a
fully-featured 30-day free trial:

Learn More About SetMe


(https://www.setme.net/?
utm_source=blog&utm_medium=win_pass)

 Share  Share 𝕏 Share  Share

Related Posts
How to Disable Windows 10 Password Prompt on
Wakeup
(https://blog.techinline.com/2018/06/15/disable-
windows-password-on-wakeup/)

How to Change the Language of Welcome Screen in


Windows 10
(https://blog.techinline.com/2016/03/29/how-to-
change-the-language-of-welcome-screen-in-windows-
10/)

Windows 10 Creators Update: A Tiny Change That May


Affect Some Applications
(https://blog.techinline.com/2017/04/11/windows-10-
creators-update-a-tiny-change-that-may-affect-some-
applications/)
Product

Features (https://www.setme.net/Features?
utm_source=blog&utm_medium=footer)

Pricing (https://www.setme.net/Pricing?
utm_source=blog&utm_medium=footer)

How It Works (https://www.setme.net/Product-


tour?utm_source=blog&utm_medium=footer)

Security (https://www.setme.net/Security?
utm_source=blog&utm_medium=footer)
Resources

Product Roadmap
(https://www.setme.net/Feature-roadmap?
utm_source=blog&utm_medium=footer)

Help Center (https://docs.set.me?


utm_source=blog&utm_medium=footer)
Try It Free

Do you enjoy reading our posts? You might also


like our remote desktop app. Give it a try, it's free
for 30 days:
Try SetMe Free
(https://www.setme.net/?
utm_source=blog&utm_medium=f

© 2024 · Techinline Ltd. (https://www.techinline.com/) · Built on the Genesis Framework


(http://www.studiopress.com/themes/genesis)

You might also like