Local administrator accounts play a crucial role in system administration. They grant users elevated privileges to perform various tasks on a computer, such as installing software, modifying system settings, and troubleshooting issues.
If you ever had a need to create a local administrator account, use the below script in Command Prompt or PowerShell.
Open PowerShell or Command Prompt from Start.
Type the below script
###
net user newusername newpassword /add
net localgroup administrators newusername /add
###
Make sure to change the newusername and newpassword with desired username and password.
net user is a command-line tool that add , delete or modify user accounts and in the above code it creates an account with name “newusername” and password as “newpassword”.
net localgroup is a command-line tool that modifies the computer groups. In the above script the net localgroup adds the “newusername” to the local administrator group.
Disclaimer
While we strive for accuracy and reliability in sharing scripts and information, it’s crucial to thoroughly test scripts and changes in a controlled environment before implementing them in your production setup. If you’re uncertain about the functionality of a script or alteration, we strongly recommend independently verifying its validity before utilization. The team behind OxusGeek.com bears no liability or responsibility for any outcomes resulting from using these scripts.