At times, you may need to execute many commands in either Command Prompt or Windows PowerShell to perform a particular task on a Windows computer. There could be times when you need to open them side by side to get something done. Instead of opening multiple Command Prompt or Windows PowerShell windows, you can use the Windows Terminal on your Windows 10 computer. By default, it adds an option in the right-click context menu to open a window quickly and enter your command. However, it doesn’t open with administrator privilege. On the other hand, some tasks need to be done with administrator permission or in an elevated window. That is why you can follow this tutorial to add an option to open the elevated Windows Terminal in the context menu. We have seen how to add an expandable context menu item to open Windows Terminal in ANY Profile, now let us see how to add context menu items to run them as administrator. As you are about to use the Registry Editor to get this change, it is highly recommended to create a System Restore point before following the steps.
Add Open Windows Terminal as administrator to Context Menu
To add or remove Open Windows Terminal as administrator to the context menu, follow these steps: To learn more about these steps, keep reading. At first, you have to open a .reg file as it is quite a task if you want to navigate each path and create the respective Key, REG_DWORD, and String Value. To do that, open Notepad on your computer and paste the following text: You can also customize the text where it says Open in Windows Terminal as administrator or Open in Windows Terminal Default Profile as administrator or Open in Windows Terminal Command Prompt as administrator or Open in Windows Terminal PowerShell as administrator. Click on the File > Save As option > choose a location where you want to save the file > give it a name with .reg extension (for example, adminterminal.reg), choose All Files from the Save as type drop-down list, and click the Save button.
Double-click on the .reg file and select the Yes option twice to confirm the change. Now you can find the Open in Windows Terminal as administrator option next to the Open in Windows Terminal option in the context menu. If you wish, you could download our ready-to-use Registry file to add this context menu item.
In case you want to remove the elevated Windows Terminal option, open the Registry Editor and navigate to these two paths:
Right-click on OpenWTHereAsAdmin > select the Delete option and confirm the change. That’s all! Read: How to Remove Open in Windows Terminal from Context Menu.