+5 votes
359 views
Change password Local Administrator or PowerShell Domain

in WindowsServer by (551k points)
reopened | 359 views

1 Answer

+3 votes
Best answer

1. How to change Local Administrator password in PowerShell
2. How to change Domain Administrator password in PowerShell

Using Windows 10 passwords is one of the most popular mechanisms for adding security to Windows Server access . This password must meet certain access parameters and it is normal that after a while we want to change the Windows Server password, either from the local administrator or from the domain. We usually do this from the Server Administrator in the section " Active Directory Users and Computers " but today we will see how to change this password from PowerShell..

 

Having a Windows Server password configured in our accounts makes it more difficult for other users to access our information. Although sometimes it is not difficult to remember so many passwords, the truth is that we must change the passwords regularly in Windows 10 to avoid making it easier to guess.

 

 

We also leave you the video tutorial to know how to change the password of Local Administrator or Domain with PowerShell..

 


To stay up to date, remember to subscribe to our YouTube channel!   SUBSCRIBE

 

 


1. How to change Local Administrator password in PowerShell

 

Step 1

The first step will be to access PowerShell as administrators by right-clicking the Start button and selecting "Windows PowerShell (Administrator)":

 

image

 

 

Step 2

Now in the PowerShell console and in the first command we are going to convert the new password into an encrypted string using the following command:
 $ NewPassword = ConvertTo-SecureString "P @ ssw0rd" -AsPlainText -Force 
Note
In the field "P @ ssw0rd" we can add the desired:

 

 

image

 

 

Step 3

After this we will change the password of your local account using the following command:
 Set-LocalUser -Name User -Password $ NewPassword 
Note
In the User field we must enter the name of the user to change, in this case we will put the username Local Administrator of the team that we want to change the password.

 

 

image

 

 

 


2. How to change Domain Administrator password in PowerShell

 

Step 1

In case you want to change the password of a user's domain we must execute the following:
 Set-ADAccountPassword user -NewPassword $ NewPassword –Reset 
Step 2

We replace user with the account name:

 

 

image

 

With this process we can change the password of a user either locally or in the domain in Windows Server and have an alternative method to that already known to all, remember to use strong passwords.

 


by (3.5m points)

Related questions

+4 votes
1 answer
+4 votes
1 answer
+3 votes
1 answer
+4 votes
1 answer
asked Sep 16, 2019 in Windows 10 by backtothefuture (551k points) | 262 views
+5 votes
1 answer
asked Sep 15, 2023 in WindowsServer by backtothefuture (551k points) | 32 views
Sponsored articles cost $40 per post. You can contact us via Feedback
10,632 questions
10,764 answers
510 comments
3 users