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

in WindowsServer by (336k points)
reopened | 93 views

1 Answer

+3 votes
Best answer

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 (2.1m points)

Related questions

+4 votes
1 answer
asked Sep 16, 2019 in Windows 10 by backtothefuture (336k points) | 82 views
+4 votes
1 answer
asked Apr 13 in Windows 10 by backtothefuture (336k points) | 133 views
+4 votes
1 answer
asked Oct 21, 2019 in Mac by backtothefuture (336k points) | 43 views
+5 votes
1 answer
asked Jul 7 in Windows10 by backtothefuture (336k points) | 57 views
+5 votes
1 answer
Please leave a comment about whether the solution works or not (with device model)   [X]Close
6,444 questions
6,535 answers
220 comments
2 users