How to always open Command Prompt as administrator

You can now launch Command Prompt always elevated, and here's how.

Command Prompt always as administrator
Command Prompt always as administrator

On Windows Terminal, you have an option to always run Command Prompt and other shells as an administrator automatically whether you use Windows 11 or Windows 10.

Although it’s always recommended to run Command Prompt without elevation, this option will reduce the extra steps to launch the command-line shell for users who often have to run commands and scripts that require admin privileges.

This guide will teach you the steps to always run Command Prompt elevated when launching Windows Terminal.

Always open Command Prompt as administrator

To run Command Prompt always as an administrator through Windows Terminal, use these steps:

  1. Open Windows Terminal.

  2. Click the menu button next to the new tab and select the Settings option.

  3. Under the “Profiles” section, click on Command Prompt.

  4. Turn on the “Run this profile as Administrator” toggle switch to run Command Prompt elevated automatically.

    Enable always run Command Prompt as administrator

  5. Click the Save button.

Once you complete the steps, close the terminal, and when you reopen Command Prompt, the console will open as admin. However, you will still need to confirm the elevation like any other app.

Enable always run as administrator option through JSON settings

To enable the elevation option in the JSON settings file, use these steps:

  1. Open Windows Terminal.

  2. Click the menu button next to the new tab and select the Settings option.

  3. Click on Open JSON file.

  4. In the Command Prompt bracket, add the "elevate": true, option.

    Command Prompt elevate true option

  5. Use the Ctrl + S keyboard shortcut to save the file.

Always open Windows Terminal as an administrator

To run all command consoles elevated through Windows Terminal, use these steps:

  1. Open Windows Terminal.

  2. Click the menu button next to the new tab and select the Settings option.

  3. Under the “Profiles” section, click on Defaults.

  4. Turn on the “Run this profile as Administrator” toggle switch to run Command Prompt, PowerShell, and any other profile elevated automatically.

    Enable always run Windows Terminal as administrator

  5. Click the Save button.

After you complete the steps, the next time you open Command Prompt, PowerShell, or any other command terminal, it will open elevated.

About the author

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He is also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me.