Skip to content
PC Moment
Tech Tips

Elevated Command Prompt: How to Open CMD as Administrator in Windows 10 and 11

Six reliable ways to open an elevated Command Prompt in Windows 10 and 11, what elevation means, and how to check you're actually running as admin.

By PC MomentUpdated 7 min read

Illustration of an Administrator Command Prompt window running whoami /priv

An elevated Command Prompt is a cmd window running with full administrator rights. You need one for commands like sfc /scannow, DISM or netsh resets that change protected parts of Windows. The quickest way on Windows 10 and 11: press the Windows key, type cmd, press Ctrl + Shift + Enter, and click Yes on the User Account Control prompt.

Below are six ways to get there, how to check that your window really is elevated, and why Windows makes you confirm it every time.

What “elevated” means

Even if your account is an administrator, Windows doesn’t run your apps with admin rights by default. Microsoft’s User Account Control (UAC) documentation explains that when an administrator signs in, Windows creates two access tokens: a standard user token, with the administrative privileges removed, and a full administrator token. Everything you open normally, including Command Prompt, uses the standard token.

When you ask to run something as administrator, Windows shows an elevation prompt:

  • If you’re an administrator, you see a consent prompt and just click Yes.
  • If you’re a standard user, you see a credential prompt and must type an administrator’s password.

That approved process is what people call “elevated.” Microsoft recommends using a standard user account as your everyday account for better security, which is why this extra step exists.

Important: An elevated Command Prompt can change system files, services and security settings. Only run commands you understand and that come from a source you trust, and close the window when you’re done. Don’t turn off UAC to avoid the prompt.

Method 1: Start search (works on Windows 10 and 11)

This is the method Microsoft uses in its own support articles.

  1. Select the Search box or press the Windows key.
  2. Type cmd.
  3. In the results, right-click Command Prompt and select Run as administrator.
  4. If you’re asked for confirmation or an administrator password, enter the password or click Yes.

Keyboard-only version: after typing cmd, press Ctrl + Shift + Enter instead of Enter. Microsoft’s Windows Insider team confirmed in a 2021 Windows 11 update note that Ctrl + Shift + Enter works for commands run from Search.

Method 2: Windows + X menu (Terminal Admin)

  1. Press Windows key + X (or right-click the Start button) to open the Quick Link menu.
  2. On Windows 11, select Terminal (Admin). Microsoft’s Terminal FAQ calls it Windows Terminal (Admin).
  3. Approve the UAC prompt.
  4. Windows Terminal opens elevated. If it starts in PowerShell, open the new tab dropdown with Ctrl + Shift + Space and choose Command Prompt. New tabs in an elevated window run as administrator too.

Note: Windows Terminal can’t mix elevated and non-elevated tabs in the same window. Microsoft says this isn’t supported for security reasons, so an admin window stays admin-only.

On Windows 10: Microsoft replaced Command Prompt with Windows PowerShell in the Windows + X menu (announced in a 2016 Insider build), so you may see Windows PowerShell (Admin) instead. To get Command Prompt (Admin) back, open Settings > Personalization > Taskbar and turn off Replace Command Prompt with Windows PowerShell in the menu when I right-click the Start button or press Windows key+X.

Method 3: The Run dialog

  1. Press Windows key + R to open the Run dialog.
  2. Type cmd.
  3. Hold Ctrl + Shift and press Enter (or click OK).
  4. Approve the UAC prompt.

Microsoft added this to the Run dialog in a 2017 Windows 10 Insider build so it matches how search works.

Method 4: From the taskbar

If you’ve pinned Command Prompt or Windows Terminal to the taskbar, Microsoft’s keyboard shortcut list gives you two more options:

  • Hold Ctrl + Shift and click the app’s icon to open it as an administrator.
  • Press Windows key + Ctrl + Shift + a number key to open, as administrator, a new instance of the app at that position on the taskbar. For example, if Command Prompt is the third pinned icon, press Windows key + Ctrl + Shift + 3.

Method 5: Always open Windows Terminal profiles as admin

If you use a Command Prompt profile in Windows Terminal every day for admin work, you can make it elevate automatically:

  1. Open Windows Terminal and press Ctrl + , to open Settings.
  2. Select your Command Prompt profile.
  3. Turn on Automatically run as Administrator.
  4. Save.

Microsoft’s documentation says this profile then always opens in an elevated window. If you launch it from a normal window, Terminal creates a new elevated window for it. You’ll still see the UAC prompt each time.

Method 6: Sudo for Windows (Windows 11 24H2 and later)

Windows 11 version 24H2 added a sudo command that runs one command elevated from a normal window.

  1. Open Settings > System > Advanced.
  2. Turn on Enable sudo.
  3. In an ordinary Command Prompt, put sudo in front of the command:
sudo sfc /scannow

This asks for UAC approval and runs sfc /scannow with administrator rights.

By default, sudo runs the command in a new window. Microsoft also offers “Input closed” and “Inline” modes, but warns that they carry security risks because another process could try to drive the elevated one. Keep the default unless you understand those trade-offs.

Important: Microsoft notes that sudo can be used to escalate privileges in some configurations. Only enable it if you need it.

Which method should you use?

MethodWindows 10Windows 11Best for
Start search + Ctrl + Shift + EnterYesYesThe fastest everyday method
Windows + X menuPowerShell (Admin) by defaultTerminal (Admin)Mouse users
Run dialog + Ctrl + Shift + EnterYesYesKeyboard users who live in Win + R
Ctrl + Shift + click on taskbarYesYesIf cmd or Terminal is pinned
Terminal profile set to adminNeeds Windows TerminalYesDaily admin work
sudoNoVersion 24H2 and laterRunning one command at a time

Why does Windows Terminal open instead of Command Prompt?

In Windows 11 version 22H2, Microsoft changed the default app that hosts console windows to Windows Terminal. So even when you choose Command Prompt and Run as administrator, you may see it inside a Terminal window. It’s still an elevated Command Prompt.

If you prefer the classic console window:

  1. Open Settings > System > Advanced.
  2. Under Terminal, select Windows Console Host.

You can also change it from Windows Terminal: open its settings, go to Startup, and set Default terminal application to Windows Console Host. Microsoft notes that some apps that mix graphical and text-mode elements can have compatibility issues with Terminal, which is one reason to switch back.

What about File Explorer?

Typing cmd in File Explorer’s address bar opens a Command Prompt at that folder, which is handy for working with files there. That window is not elevated, though. For admin rights, use one of the methods above.

How to tell if Command Prompt is elevated

The surest sign is that you saw and approved a UAC prompt when the window opened. If you’re not sure, you can compare privileges:

  1. In the window you want to check, run:
whoami /priv

This lists the security privileges of the current user for that window.

  1. Run the same command in a normal Command Prompt.

Because the standard token has administrative privileges removed, the elevated window shows a longer list of privileges than the normal one.

If it still doesn’t work

  • No UAC prompt and “Run as administrator” fails: Your account may be a standard user. You’ll need an administrator’s password, or ask your IT team to run the command for you.
  • Work or school PC: Microsoft notes that UAC prompt behavior is controlled by security policies, and your organization may manage them. Contact IT rather than looking for workarounds.
  • The shortcut keys do nothing: Fall back to Method 1 and right-click Command Prompt in the search results. It’s the method Microsoft uses in its own repair articles.

Many repair guides start with an elevated Command Prompt. If you’re here because of an error, these guides use one:

For everyday keys that work inside the window, read our Command Prompt shortcuts, and find more guides in Tech Tips.

Frequently asked questions

What is an elevated command prompt?

It's a Command Prompt window that runs with your full administrator access token instead of the standard user token Windows uses by default. Commands that change system settings or protected files need it.

What is the quickest way to open Command Prompt as administrator?

Press the Windows key, type cmd, then press Ctrl + Shift + Enter and approve the User Account Control prompt. Right-clicking Command Prompt in the results and choosing Run as administrator does the same thing.

Why don't I see Command Prompt (Admin) in the Windows + X menu?

On Windows 11 the menu offers Terminal (Admin), which opens Windows Terminal elevated, and you can open a Command Prompt tab inside it. On Windows 10 the menu may show Windows PowerShell (Admin) unless you turned off the taskbar setting that replaces Command Prompt with PowerShell.

Can I run a single command as admin without opening a new window?

On Windows 11 version 24H2 and later, you can turn on Sudo for Windows in Settings and put sudo in front of a command. By default it runs the command in a new elevated window.

Related guides