How to run CMD or PowerShell as administrator, no right clicks required

CMD and PowerShell running as administrator
(Image credit: Tom's Hardware)

For some important tasks in Windows, you need to open the Command prompt and run it as an administrator. For example, if you want to run Diskpart, which allows you to list, create, or delete partitions at the command line, you need to open CMD (aka the command prompt app) as administrator. For some tasks, you may prefer to use PowerShell, which has all the functionality of the Command prompt but adds in advanced scripting capabilities / cmdlets.

When you run CMD as admin, it's called running an elevated Command prompt, because your privileges are elevated. If you are an administrator of your PC -- likely the case if you bought or built your own computer -- your primary user probably has admin rights (if you were issued a corporate computer from work or school, maybe not). You just need to exercise those rights, because by default, neither the command prompt nor PowerShell runs as admin.

How to Run Cmd as Admin Using Right Click

The easiest way to run any program, including CMD, with admin rights in Windows 11 or 10 is to search for it in Windows search then right click the icon and select Run as Administrator.

(Image credit: Tom's Hardware)

It almost goes without saying that, unless you have disabled User Account Control, Windows will present you with a confirmation dialog box asking if you are sure you want to run CMD as an admin.

This same method works for PowerShell or any other program you wish. However, I hate using this method because it adds a step of right-clicking and then choosing an item from the context menu. On a laptop with a stiff or slippery touchpad, you could end up having to try a couple of times to right-click and select Run as Administrator.

How to Configure Cmd to Always Run as Admin

I can't think of a time when I'd want to run the command prompt or PowerShell and not have them run in admin mode. Fortunately, there's a way to make each program (or any program) default to running as admin as soon as you click its shortcut. Here's how to do it for the Command prompt, but the same steps would work for PowerShell.

1. Search for "command prompt" or "CMD" in Windows Search.

2. Right-click on the top result and select Open File Location.

select open file location

(Image credit: Tom's Hardware)

The location of the shortcut for Command prompt will open in Windows Explorer.

3. Right-click on the Command Prompt shortcut icon and select Properties.

(Image credit: Tom's Hardware)

4. Click Advanced.

Click Advanced

(Image credit: Tom's Hardware)

5. Toggle Run as Administrator to On and click OK.

toggle run as administrator to On and Click Ok

(Image credit: Tom's Hardware)

6. Click Ok in the Command Prompt properties box to close it.

Next time you search for "CMD" or "command prompt" and click the top result, you will get an administrative command prompt.

Note that an elevated Command Prompt will, as a security measure, always launch in C:\Windows\System32 — the shortcut's "Start in" field gets ignored. If you want to launch an elevated Command Prompt in a different folder, like C:\Users, you can get around the restriction by passing a change directory (or pushd) command to the prompt via the /k option. To do this, change the Target to include the extra parameters like this:

%windir%\system32\cmd.exe /k "pushd C:\Users"

Use CTRL + Shift Enter to Launch Cmd as Administrator

Let's say you want to launch an elevated command prompt, but you don't want to change the command prompt shortcut so it happens every time. No problem. You can use the keyboard shortcut Ctrl + Shift + Enter when you select the command prompt icon from Start or even when you run CMD from the run dialog.

To use the run dialog to launch cmd as administrator:

1. Hit Windows key + R to open the run dialog box.

2. Type cmd into the run dialog box.

type cmd into the run dialog box

(Image credit: Tom's Hardware)

3. Hit Ctrl + Shift + Enter.

Use the Windows + X Context menu to launch PowerShell as Admin

This method only works for PowerShell, but as we've said, PowerShell can do everything that CMD can do and more.

1. Hit Windows key + X. A long context menu will appear on the desktop.

2. Select Terminal (admin)

select Terminal Admin

(Image credit: Tom's Hardware)

A PowerShell window with admin privileges will launch.

Avram Piltch
Avram Piltch is Tom's Hardware's editor-in-chief. When he's not playing with the latest gadgets at work or putting on VR helmets at trade shows, you'll find him rooting his phone, taking apart his PC or coding plugins. With his technical knowledge and passion for testing, Avram developed many real-world benchmarks, including our laptop battery test.
  • Blitz Hacker
    Where I appreciate the knowledge and information, are you sure posting an article on how to run a terminal/console as a SU/admin is a good idea.
    Generally speaking in my experience, if they don't know how to do that on windows, they probably shouldn't be doing -anything- with the admin console
    Reply
  • das_stig
    Agree if you need admin access you would know these shortcuts from Windows 9x days.

    Can only assume somebody was desperate for an article near deadline day and came up this frelling dren!
    Reply
  • apiltch
    das_stig said:
    Agree if you need admin access you would know these shortcuts from Windows 9x days.

    Can only assume somebody was desperate for an article near deadline day and came up this frelling dren!
    Thanks for the feedback and the Farscape reference. We do not have a "deadline day" and I came up with this because I find myself launching an elevated command prompt very often and I don't like having to right click and select "Run as Administrator" every time. It's an extra click when the only reason I ever open command prompt is to do something that requires permissions.

    So I learned how to configure the CMD shortcut so that it always launches as admin with no right click necessary and thought I could take a few minutes to share the details just in case someone else might find them useful. You're right that MOST people know about right clicking to run as admin, but I bet not everyone knows that there's an option to configure CMD to always run as admin without the right click.
    Reply
  • apiltch
    Blitz Hacker said:
    Where I appreciate the knowledge and information, are you sure posting an article on how to run a terminal/console as a SU/admin is a good idea.
    Generally speaking in my experience, if they don't know how to do that on windows, they probably shouldn't be doing -anything- with the admin console
    Many tasks require an elevated command prompt or PowerShell terminal.
    Reply
  • QChronoD
    Typically I run 'cmd' from the address bar in explorer so i don't have to navigate to wherever I am. Too bad the Shift + Crtl + Enter doesn't work there. (it just opens normal version)
    In Win 10, you could Shift + R-click the file menu and it would give options to run terminal or power shell from that folder, but that also seems to have disappeared in Win11
    Reply
  • USAFRet
    QChronoD said:
    Typically I run 'cmd' from the address bar in explorer so i don't have to navigate to wherever I am. Too bad the Shift + Crtl + Enter doesn't work there. (it just opens normal version)
    In Win 10, you could Shift + R-click the file menu and it would give options to run terminal or power shell from that folder, but that also seems to have disappeared in Win11
    That still exists in Win 11. In Pro, at least.
    Reply