Curious Minds

Clear answers to science and history questions

How to Open CMD as Admin on Windows

· 6 min read · Science

To open Command Prompt as administrator, press the Start button, type cmd (or Command Prompt), then right-click the result and choose Run as administrator. Windows shows a User Account Control prompt asking for confirmation; click Yes and a Command Prompt window opens with the title bar reading "Administrator: Command Prompt." That elevated session can run commands that change system settings, install services, repair network configuration, and modify protected files — actions a normal Command Prompt window refuses with "Access is denied."

Elevation is a permission level, not a different program. The same cmd.exe runs either way; the difference is the security token it carries. A standard token cannot write to protected system folders or change machine-wide settings, while an administrator token can. Because of that, Windows deliberately makes elevation a conscious act: you have to confirm it, and on a standard user account you must supply an administrator's password. Everything below assumes a Windows 10 or Windows 11 PC, though the same methods work on Windows 8.1 with only cosmetic differences.

What You'll Need

  • A Windows PC you are allowed to administer. Using an administrator account on a machine you do not own or manage may breach its policy.
  • An account that is a member of the local Administrators group, or the password for such an account if you are signed in as a standard user.
  • Ability to respond to the User Account Control (UAC) prompt — either clicking Yes or typing an admin password.
  • No extra software. Command Prompt ships with Windows.

Step-by-Step

  1. Open the Start menu. Click the Start button on the taskbar or press the Windows key on your keyboard.
  2. Type the search term. Type cmd or Command Prompt. Results appear as you type; the top match is usually the Command Prompt app.
  3. Right-click the Command Prompt result. A context menu opens. Do not left-click yet — left-clicking launches it without elevation.
  4. Choose "Run as administrator." On Windows 11 this item may sit under "Run as administrator" directly in the menu; on Windows 10 it is in the same right-click menu. If you only see "Open file location," you have right-clicked the wrong item — go back to the search result itself.
  5. Approve the UAC prompt. A dialog asks "Do you want to allow this app to make changes to your device?" Click Yes. If you are signed in as a standard user, the dialog instead asks for an administrator's username and password; enter them and confirm.
  6. Verify elevation. The new window's title bar should read Administrator: Command Prompt. As a second check, type whoami /groups and press Enter; look for a line containing Mandatory Label\High Mandatory Level, which indicates an elevated session. Typing net session is a quicker test: it succeeds when elevated and returns "Access is denied" when not.
  7. Run your command, then close the window. Elevated windows stay elevated until closed. Closing the window ends the session and drops the elevated token, which is the safest default when you are finished.

Several alternative routes reach the same place. Press Ctrl+Shift+Enter instead of Enter after typing cmd in Start search — this launches the highlighted result elevated in one keystroke. You can also press Win+X (or right-click the Start button) and pick Terminal (Admin) or Windows PowerShell (Admin) on older builds; Command Prompt can be started from inside those. From File Explorer, type cmd into the address bar of any folder and press Enter to open a normal prompt already pointed at that folder — useful, but it is not elevated, so you would still need another method for admin rights. A shortcut can also be configured permanently: right-click an existing Command Prompt shortcut, open Properties, click Advanced, and tick Run as administrator.

Common Mistakes

  • Left-clicking instead of right-clicking. The single most common error. A normal window looks identical apart from the missing "Administrator:" prefix, so people run a command, get "Access is denied," and assume the command is wrong.
  • Not checking the title bar. Always confirm the prefix before troubleshooting a failed command. Many "broken" commands are simply unelevated.
  • Dismissing the UAC prompt. Clicking No, or pressing Escape, silently cancels elevation and leaves you at a normal prompt if one was already open.
  • Assuming an admin account skips UAC. Membership in the Administrators group does not remove the prompt; it only means you can approve it yourself. Only the built-in Administrator account, which is disabled by default, behaves differently.
  • Leaving elevated windows open all day. An elevated prompt can change anything on the machine. Close it when the task is done.
  • Pasting commands from unfamiliar sources. Elevation removes Windows' safety net. Read a command before running it, especially anything involving format, diskpart, del, or registry edits.

Tips

  • Pin Command Prompt to the taskbar, then right-click the pinned icon and choose "Run as administrator" — one of the fastest repeat routes.
  • Use the arrow-up key to recall previous commands in the session; history is per-window, so an elevated window has its own separate history.
  • Right-clicking inside the Command Prompt window pastes clipboard contents, which is quicker than retyping long paths.
  • If you need an elevated prompt in a specific folder, open the folder in File Explorer, then use File > Open command prompt > Open command prompt as administrator (present in Windows 10; Windows 11 replaced it with the Terminal entry in the context menu).
  • Run sfc /scannow or chkdsk only from an elevated prompt — they fail or do nothing useful otherwise.

Troubleshooting

"Run as administrator" is missing from the right-click menu. You are probably right-clicking a shortcut or a pinned tile rather than the search result. Search again and right-click the app entry itself. If the option is greyed out, your account is not in the Administrators group.

The UAC prompt never appears and nothing opens. UAC may be disabled by policy, or the machine is managed by an organisation that blocks elevation. Check with whoever administers the PC.

You are asked for a password you do not have. Standard accounts cannot elevate without an administrator's credentials. Sign in with an administrator account instead.

The window opens but commands still say "Access is denied." Confirm the title bar prefix. If it is present and the command still fails, the file or registry key may be locked by another process or protected by permissions beyond administrator level — some system files are owned by TrustedInstaller and need ownership changes first.

Command Prompt is blocked entirely. Some environments disable it through Group Policy or the registry. The policy setting is usually found under User Configuration > Administrative Templates > System in the Group Policy Editor, but changing it requires administrator rights you may not have.

You cannot find Command Prompt in search. Open Run (Win+R), type cmd, and press Ctrl+Shift+Enter to launch it elevated.

Frequently Asked Questions

Is opening Command Prompt as administrator dangerous?

It is not dangerous by itself, but it removes the safeguards that stop a command from changing system settings or deleting protected files. The risk comes from the commands you run, not the window. Close the elevated window when finished.

Do I need to be an administrator to open CMD as admin?

You need administrator credentials, but not necessarily an administrator account. A standard user can elevate by entering an administrator's username and password at the UAC prompt.

How can I tell whether Command Prompt is running as administrator?

The title bar reads "Administrator: Command Prompt." Running whoami /groups and finding "High Mandatory Level" confirms it, and net session succeeds only in an elevated window.

Does running CMD as admin affect other programs?

No. Elevation applies only to that window and anything launched from it. Other programs keep their normal permission level.

Why does the UAC prompt ask for a password instead of showing Yes and No?

Windows shows Yes/No when the signed-in user is an administrator and asks for a password when the signed-in user is a standard account. This is controlled by the UAC settings.

Can I make Command Prompt always open as administrator?

Yes, by editing a shortcut's properties, clicking Advanced, and ticking "Run as administrator." The UAC prompt still appears each time — Windows does not allow bypassing it.

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions