Run Windows Terminal as Administrator by Default

Windows Terminal

Windows Terminal is a nice command-line tool, supporting PowerShell, Command Prompt, Azure Cloud Shell, Windows Subsystem for Linux (can open Linux prompts), etc.

One major issue is that it is a pain to regularly open Windows Terminal as an Administrator. It requires right-clicking on the launch icon and selecting Run as Administrator. Ugh!

With Command Prompt and PowerShell, one can change the properties to always run as administrator. Unfortunately, this is not the case with UWP packages. Shortcuts to UWP apps cannot be made to run as an administrator. For developers or IT Admins, this is a big pain.

To work around this, a hack is to call, via Command Prompt as Administrator, Windows Terminal (wt.exe).

  1. Right-click on the Desktop or a folder and select New > Shortcut.
  2. Type in the following location textbox and click next:
    c:\windows\system32\cmd.exe /c start /b wt
  3. In the name textbox, type in Windows Terminal and click next.
  4. Right-click on the newly created shortcut and select Properties.
  5. Click the Advanced button and check Run as Administrator.
  6. If you want to go the extra mile to make it look nice, download the terminal.ico file via GitHub. Again, right-click on the created shortcut and select Change Icon. Select the downloaided terminal.ico file.
  7. Right-click on the created shortcut and select Pin to Taskbar.

The one down side to this approach is that you will see a Command-line prompt popup momentarily until it launches Windows Terminal. This seems like small price for the convenience of always running Windows Terminal as administrator. Happy computing!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s