Command Prompt is a built-in command-line interpreter in Microsoft windows. You type and command in it and it will execute it. You don’t need a GUI for it. But there are a lot of commands that need administrator approval to execute, for that we have to run command prompt (CMD) as an administrator.
In this article, we are going to teach you how to run a command prompt (CMD) as an administrator in windows 10. So, stay tuned!
Here are some ways by the virtue of which you can have the privilege of running the command prompt as an administrator.
Methods To Run CMD as Administrator
1. Open Command Prompt (CMD) as administrator by the Power User Menu:-
Power User Menu is a built-in shortcut in windows 10(and 8) that allows the user to run command prompt as an administrator. To do, that just be obedient to the following steps.
Step 1: Right-click on the start menu or press Windows + X. There you will see a menu like the one in the image below.
Step 2: Click on Command Prompt(Admin). Afterward, a “user account access” pop-up screen will appear where you have to select YES to allow the access.
Afterward, you will see this screen.
You can confirm it by looking at the header of the command prompt. As you can see here the header is showing administrator: command prompt which means that have the privilege to run command prompt as an administrator.
Sometimes, when you press “Windows + X” you might see PowerShell rather than the command prompt. PowerShell is nothing but a more advanced and glamorous version of Command Prompt.
If you want to put command prompt back in the Windows + X menu, be obedient to the following steps:-
Step 1: Launch settings by either searching it out from the search menu or by using the shortcut Windows + I.
Step 2: From the appeared window select Personalize option.
Step 3: Click on Taskbar from the list placed at the left on your screen.
Step 4: Now scroll down to Replace Command Prompt with Windows PowerShell and switch off the option.
And you are good to go now you can check that by just pressing Windows + X.
Another method by which one can easily run the command prompt as an administrator is by doing it from the start menu. As we all know start menu is like a gateway to all your applications and you can open any application from there.
To run the command prompt as an administrator from the start menu follow the steps prescribed below:-
Step 1: Search command prompt from the start menu.
Step 2: You will see the app’s icon on the left side and you will see quite a few options click on “Run as administrator”
This will allow you to run command prompt as administrator.
Now, just allow the user control access and you will be redirected to administrator access command prompt.
3. How to open the command prompt as an administrator via RUN
The RUN box has been used as an application opening source for ages and in this section, we are going to teach how to open the command prompt as an administrator with the help of RUN. Just be obedient to the prescribed steps and you are good to go.
Step 1: Launch RUN by either from the start menu or with the help of shortcut “Windows + R”.
Step 2: RUN box will appear type “cmd” there.
Step 3: press “Ctrl + Shift + Enter” to run the command prompt as an administrator.
These were the three methods by which you can easily run the command prompt as an administrator.
4. How to always run command prompt as an administrator
If you are irritated by all these steps and want to make “run as administrator” your command prompt’s default setting, you will be able to do that after reading this section of the article.
There are two methods of doing that.
1. By making a shortcut:-
This method is an OG in this department. It has been serving for ages after making its first appearance in the Windows Vista. You have to just modify a regular shortcut and enable “run as administrator” option.
To do that, obey the following steps:-
Step 1: Right-click on your desktop and from the appeared list select New>Shortcut.
Step 2: Type “cmd.exe” in the target box and hit enter.
Step 3: After naming the shortcut, click ok to create your normal command prompt shortcut.
Step 4: Now once your shortcut is created, right-click on the icon and select properties from the appeared list.
Step 5: Afterwards, go to the security tab and click the “advanced” button placed below the comment section.
Step 6: A window will appear where you have to tick the “Run as administrator”.
Click OK to end the creation and you are good to go. Now, whenever you want to run command prompt as an administrator just click this icon and go to “user account control” portal and select yes. To run your command prompt as an administrator.
2. Task Scheduler:-
One of the demerits of running command prompt as an administrator by the previous method is that, every time you start the program you have to permit the user account control. But what if you don’t want to do that. I got you covered in this sub-section.
To skip the user access control windows and run command prompt elevated, we have to create a special task in the windows task scheduler to give the administrator allowance to skip UAC. The task schedular has an in-built graphic MMC version that we are going to use here.
To do that just be obedient to the following steps:-
Step 1: Launch control panel from the start menu or open run(Windows + R) and search command prompt there.
Step 2: Go to Control Panel>Administrator Tool.
Step 3: From the window appeared open “Task Scheduler”.
Step 4: On the left side you will see “task scheduler library”, select that.
Step 5: Afterwards, click on “create task” located on the right side of the window.
Step 6: A new window will pop-up namely “Create task”. Select the General tab. Under which you ought to pick a name(“administrator” in my case). The filling of the description is optional. Afterward, tick the checkbox named “Run with highest privileges”.
Step 7: Select the action tab and click on the “New” button.
Step 8: In the new action menu, type “c:\windows\regedit.exe” in the Program/Script section and “c:\windows\system32\cmd.exe” in the add an argument section.
Step 10: After clicking OK, switch to condition tab and untick
-stop if the computer switches to battery power
-start the task only if the computer is on AC power.
For a clear look observe the following image
Step 11: Click OK
Now you have successfully created the file.
Step 12: Now add another shortcut to the screen.
A window will appear where you have to enter the location of the file that you have created.
In the location section type “schtasks /run /tn “your task name”
In my case, it is “schtasks /run /tn “administrator”
And you are good to go now you don’t have to worry about UAC permission.
5. Make yourself an admin by command prompt
If you want other users to access the command prompt as an administrator then you might want to give them access as well. Fortunately, the command prompt gives the users that luxury as well.
Make yourself an admin by command prompt by the following steps:-
Step 1: Launch command prompt by either searching it out from the start menu or the RUN box(Windows + R) and type cmd>enter.
Step 2: On the command prompt windows “net user administrator /active:yes”
And you are good to go you will see and confirmation. In the next line as shown in the image below.
Note if you want to revert back your decision you can type “net user administrator /active:no”.
That’s how you can make yourself an administrator in windows 10 with the help of command prompt in just two easy steps.
To open the command prompt as an administrator via Power User Menu, press Windows + X, and select Command Prompt(Admin).
To open the command prompt as an administrator via the start menu, search “command prompt” from the taskbar and click on run as an administrator.
To run command prompt as an administrator from the RUN box(Windows + R) search cmd there and then press Ctrl + Alt + Enter.
To always run command prompt as an administrator we can do that either by start menu or by the task scheduler. (discussed above)
You can make yourself admin via command prompt with the help of this command “net user administrator /active:no”.
That was all it in this article if are stuck somewhere please let me know in the comment section below.