To run Command Prompt as an administrator in Windows 11, select Start, type cmd, and select Run as administrator on the right. Select Yes when Windows asks for permission, and a window titled Administrator: Command Prompt opens.
These steps cover Windows 11, including PCs where Command Prompt opens inside Windows Terminal. A short Windows 10 section is near the end.
An administrator window, also called an elevated Command Prompt, is needed for commands that change system files or settings, such as sfc /scannow, chkdsk, diskpart, or netsh. For a standard window, here’s how to open Command Prompt in Windows 11. The steps follow Microsoft’s User Account Control guide and Windows Terminal documentation.
Run Command Prompt as Administrator From Start

- Select Start or press the Windows key.
- Type cmd. Command Prompt appears as the best match.
- Select Run as administrator on the right. You can also right-click Command Prompt and choose it there, or press Ctrl + Shift + Enter while it is highlighted.

- Select Yes in the User Account Control prompt. The screen dims while the prompt is showing.
The window that opens depends on your PC. On many Windows 11 PCs, Command Prompt now opens as a tab inside Windows Terminal, the tabbed command-line app, rather than in the classic black console window. Either way, the title reads Administrator: Command Prompt, and the commands work the same.

What the Prompt Means
Microsoft calls this the User Account Control (UAC) consent prompt. If your account is an administrator, you only need to select Yes. If you use a standard account, Windows shows a credential prompt instead, and someone has to enter the username and password of an administrator account. Windows does this because even administrators normally run apps with standard rights, and elevation hands full rights to just the one app you approved.
An administrator window is what you need for tasks such as using rmdir to force delete a folder in Windows 11. Another is enabling the built-in Administrator account with net user.
You also need administrator rights to edit the hosts file in Windows 11, whether you use Notepad or a command.
Other Quick Ways

Run Box
Press Windows key + R, type cmd, and press Ctrl + Shift + Enter instead of Enter. Then select Yes in the prompt. Pressing Enter or OK opens a standard window, not an admin one.
Task Manager
- Press Ctrl + Shift + Esc to open Task Manager.
- Select Run new task at the top. In older versions, it is under the File menu.
- Type cmd and check Create this task with administrative privileges.

- Select OK.
This is handy when the Start menu or search is not responding. No UAC prompt appears, because Task Manager on an admin account is already elevated.
Windows Terminal
Right-click Start (or press Windows key + X), select Terminal (Admin), and approve the prompt. Terminal opens with PowerShell by default. Press Ctrl + Shift + 2, or select the down arrow next to the + tab button and choose Command Prompt. The number matches Command Prompt’s place in Terminal’s profile list, which is usually second, so check the shortcut shown in that menu. Tabs opened from an admin Terminal window are also admin, and Microsoft’s Terminal FAQ notes that one window cannot mix admin and standard tabs.
An admin Terminal window is also where you install Kali Linux on Windows 11 with the wsl command.
File Explorer
Open File Explorer, go to C:\Windows\System32, right-click cmd.exe, and select Run as administrator. This is useful if search cannot find Command Prompt.
From PowerShell or the Run Box With a Command
In any PowerShell window, type Start-Process cmd -Verb RunAs and press Enter. From the Run box, type powershell Start-Process cmd -Verb RunAs and select OK. Both show the UAC prompt and then open an elevated Command Prompt.
Sudo for Windows (Windows 11, Version 24H2 or Later)
Windows 11 version 24H2 and later include an optional sudo command that runs a single command with admin rights from a normal window. Turn it on in Settings > System > Advanced > Enable sudo (older builds list it under For developers). Then type sudo before a command, such as sudo netstat -ab, and approve the prompt. By default, the command runs in a new elevated window. Microsoft’s Sudo for Windows page explains the other modes and their security trade-offs, and recommends keeping the default.
Make Command Prompt Always Open as Admin
Only do this if you run admin commands often, since every launch will show a UAC prompt.
In Windows Terminal
Microsoft’s Terminal profile settings include Automatically run as Administrator. When it is on, opening that profile from a normal window starts a new elevated window, and opening it from an elevated window adds a new tab.
- Open Windows Terminal and press Ctrl + , to open Settings.
- Under Profiles, select Command Prompt.
- Turn on Automatically run as Administrator, then select Save.

To have Terminal start in Command Prompt, change Default profile in Terminal’s Settings > Startup, as Microsoft shows in its Terminal startup settings.
With a Desktop Shortcut
- Right-click an empty part of the desktop and select New > Shortcut.
- Type cmd.exe as the location, select Next, name it (for example, Admin Command Prompt), and select Finish.
- Right-click the new shortcut, select Properties, and open the Shortcut tab.
- Select Advanced, check Run as administrator, and select OK, then OK again.

Double-clicking the shortcut now opens an elevated window after the UAC prompt. You can right-click it and pin it to Start or the taskbar.
Get the Classic Command Prompt Window Back
If you prefer the old standalone window, open Windows Terminal, go to Settings > Startup, and change Default terminal application to Windows Console Host. Select Save. Choosing Windows Terminal or Let Windows decide switches it back. The same option is in Windows Settings under System > Advanced > Terminal on recent builds.
How to Tell It Worked
Check that the title bar or tab says Administrator: Command Prompt. For a second check, type net session and press Enter. An elevated window lists sessions or says there are no entries, while a standard window answers with Access is denied. The starting folder can vary, so seeing your user directory or C:\Windows\System32 does not tell you whether it is elevated. If the administrator title is missing, close the window and reopen it using one of the methods above.
If It Does Not Work
- Windows asks for a password instead of Yes. You are on a standard account. Enter an administrator’s username and password, or ask the person who manages the PC.
- A command says “Access is denied” or “The requested operation requires elevation.” The window is not elevated. Close it and reopen it as administrator.
- Start or search will not open. Use the Task Manager method, which does not depend on either.
- Terminal (Admin) is missing from the Windows + X menu. Windows Terminal may have been removed. Use Start search or the Run box, or reinstall Windows Terminal from Microsoft Store.
- A message says Command Prompt has been disabled by your administrator. A work or school policy blocks it. Contact your IT department.
Open an Administrator Command Prompt in Windows 10
Select Start, type cmd, right-click Command Prompt, and choose Run as administrator. Select Yes in the User Account Control prompt, or enter an administrator’s password on a standard account. The Run box and Task Manager methods above also work the same way.
Check that the title bar says Administrator: Command Prompt.
On Windows 10, the Windows + X menu shows Windows PowerShell (Admin) by default. To list Command Prompt (Admin) there instead, go to 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. Microsoft ended support for Windows 10 in October 2025, so consider upgrading if your PC qualifies.
Admin Command Prompt Questions
Why do I not see Run as administrator?
Make sure the Command Prompt app is the highlighted result in Start search. The right pane shows Run as administrator for apps, not for web results or settings. You can also right-click the Command Prompt result. On a standard account the option still appears, but Windows asks for an administrator’s password. Other apps can be elevated the same way; here’s how to run as administrator in Windows 11.
What is the difference between Command Prompt and PowerShell?
Both run commands. Most classic commands, like ipconfig and chkdsk, work in either. PowerShell also runs PowerShell cmdlets. You can elevate PowerShell the same way by searching for PowerShell instead of cmd.
Can I run Command Prompt as admin without an administrator password?
No. On a standard account, elevation always needs an administrator’s credentials. That protection is the point of User Account Control.
Is it safe to run Command Prompt as admin?
Yes, but commands can change system settings, and Command Prompt does not ask you to confirm most of them. Only run commands you understand or got from a trusted source, and close the admin window when you are done.
One common use is removing a stubborn read-only file when you force delete a file with Command Prompt.
Entering a Windows product key with slmgr is one task that needs an admin window; here’s how to activate Windows 11 with Command Prompt.
Some Windows features, like the Telnet client, can be turned on from an admin prompt. Here’s how to enable Telnet on Windows 11.
An admin prompt is also the quickest way to find your Windows 11 product key if your PC came with Windows installed.
Want to run Python from the command line? Here’s how to install Python on Windows 11.

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are checked step by step against the device or app maker’s own documentation and tested on his own devices whenever he has the hardware or software, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.