Situatie
It is sometimes useful to run programs as administrator — but what if you want to run everything as administrator? Windows 10 and Windows 11 include an administrator account, but it is disabled by default — for good reasons.
Solutie
Pasi de urmat
To enable the administrator account with Command Prompt, click Start, type “command prompt” in the search bar, and then click “Run as administrator.”
Type net user administrator /active:yes
into the window. If it worked, you should see “The command completed successfully.”
Once the account has been enabled, all you have to do is switch users to access it. It will also be available any time you restart your PC.
The process for enabling the administrator account with PowerShell is identical to Command Prompt.
- To enable the administrator account with PowerShell, click Start, type “powershell” in the search bar, and then click “Run as administrator.”
Type net user administrator /active:yes
in PowerShell, then hit Enter. If the account was activated, you’ll see “The command completed successfully.”
If you’re going to use the administrator account regularly you should set a password, especially if you don’t plan to disable the account.
To set a password, launch Command Prompt or PowerShell as administrator like was shown in the previous steps. Then type net user administrator ExamplePassword
in either Command Prompt or PowerShell, but replace ExamplePassword
with whatever password you want.
- Disabling the administrator account uses the same command as enabling it—with one small tweak.
- Just like before, launch Command Prompt or PowerShell as administrator.
- Type
net user administrator /active:no
in and hit Enter.
You should see “The command completed successfully” again. Log out or switch users to verify that the account has been disabled. The administrator account adds convenience, but is definitely not something you should use daily. Be sure to double check any commands that you run, and any files you move, modify, or delete. Also remember that leaving the administrator account enabled is a serious security vulnerability.
Leave A Comment?