You can launch an elevated Command Prompt from the command line itself, but only if you already have a non-elevated command window open: type powershell -Command "Start-Process cmd -Verb RunAs" and confirm the User Account Control prompt. There is no built-in sudo-style prefix in standard Windows, and you cannot elevate a window that is already running — elevation always starts a new process. The steps below cover the reliable methods, what each one does, and the most common reasons the UAC prompt never appears.
What You'll Need
- A Windows 10 or Windows 11 PC (the steps are for desktop Windows; the wording of menus can differ slightly by version, edition and region).
- An account that is a member of the local Administrators group. A standard user account cannot approve elevation without an administrator's credentials.
- Access to the keyboard and the desktop — elevation prompts cannot be approved from a remote session that is locked or from some restricted kiosk modes.
- No third-party tools are required. Everything here uses built-in Windows components.
Step-by-Step
- Open a normal Command Prompt first. Press
Win+R, typecmd, and press Enter. This gives you a non-elevated window from which you will launch the elevated one. You can also open Command Prompt from the Start menu search. - Confirm you are not already elevated. In the window, run
whoami /groupsand look for the line containingMandatory Label\High Mandatory Level. If it saysMedium Mandatory Level, the window is not elevated and you need to start a new one. You cannot upgrade the current window in place. - Launch an elevated cmd with PowerShell. In the same window, type:
powershell -Command "Start-Process cmd -Verb RunAs"
and press Enter. This asks Windows to start a newcmd.exeprocess with the Run as administrator verb. - Approve the User Account Control prompt. A dialog titled User Account Control appears asking whether to allow the app to make changes. Click Yes. If you are signed in with a standard account, you will instead be asked for an administrator's username and password.
- Verify the new window is elevated. The new Command Prompt window's title bar begins with Administrator:. Run
whoami /groupsagain and confirm it now showsHigh Mandatory Level. Any command you run in this window has administrator rights. - Use the elevated window for the task, then close it. Elevation lasts only for that window. When you close it, the rights end. Do not leave an elevated prompt open on a shared or unlocked machine.
- Optional: launch a specific program elevated. To start something other than cmd with admin rights, use the same pattern with the program's path, for example
powershell -Command "Start-Process notepad -Verb RunAs". Replacenotepadwith the executable you need. - Optional: skip the extra PowerShell step with a shortcut. If you will do this often, create a desktop shortcut to
cmd.exe, open its properties, and on the Shortcut tab enable Run as administrator. Double-clicking it launches an elevated prompt directly, with the same UAC confirmation.
Common Mistakes
- Expecting
sudoto work. Standard Windows does not include asudocommand in the default Command Prompt. Typing it returns an unrecognized-command error. Use the PowerShellStart-Process ... -Verb RunAsmethod instead. - Trying to elevate the current window. There is no command that raises an already-running console's privileges. You must start a new process, which is why the steps above open a second window.
- Running the launch command from an already-elevated prompt. It works, but it opens yet another elevated window and can confuse which one you are typing in. Check the title bar.
- Quoting problems. In PowerShell, the entire
-Commandargument must be in double quotes, and the inner program name is unquoted. If you paste a version with mismatched quotes, PowerShell throws a parser error instead of launching anything. - Assuming a standard account can self-approve. If your account is not in the Administrators group, clicking Yes is not enough — you need an administrator's credentials at the prompt.
- Leaving elevated windows open. An elevated prompt is a security risk on a shared PC. Close it as soon as the task is done.
Tips
- Check the title bar before typing: an elevated Command Prompt shows Administrator: at the start of the title.
- Use
whoami /groupsas a quick, reliable elevation check rather than guessing from the prompt text. - If you only need one elevated command, you can run it directly with
powershell -Command "Start-Process cmd -ArgumentList '/c your-command-here' -Verb RunAs", which opens, runs and can close the window. - Keep a pinned elevated shortcut for maintenance tasks rather than elevating every window you open.
- Prefer the official Windows tools and built-in commands; avoid downloading third-party "admin" utilities that claim to bypass UAC.
Troubleshooting
If the UAC prompt never appears, first make sure you launched from an interactive desktop session and that the window is not hidden behind other windows — the prompt sometimes opens behind the active app. Press Alt+Tab or check the taskbar. If you clicked No or the prompt was dismissed, simply rerun the launch command.
If you get an "Access is denied" or "The requested operation requires elevation" error, the command is running in a non-elevated window. Close it and relaunch with the steps above. If the UAC dialog asks for a password you do not have, your account is a standard user; ask an administrator on the PC to enter credentials or to add your account to the Administrators group.
If PowerShell reports that Start-Process is not recognized, you may be in the legacy Command Prompt rather than PowerShell — the command must be run through powershell -Command as shown, not typed directly into cmd. If the command is blocked by policy on a managed work PC, elevation may be restricted by your organization; contact IT rather than trying to work around it.
If the elevated window opens but the command still fails, check that the command itself is correct and that the target file exists. Elevation grants rights, not correctness.
Frequently Asked Questions
Can I run cmd as administrator without a UAC prompt?
Not through normal means. UAC confirmation is a core Windows security feature, and there is no supported built-in way to skip it for an interactive launch. A shortcut with Run as administrator still triggers the prompt.
Is there a sudo command in Windows?
Not in the standard Command Prompt. Use the PowerShell Start-Process -Verb RunAs pattern described above, which achieves the same result of starting a new elevated process.
Why does my elevated window close immediately?
If you launched a single command with /c, the window closes when the command finishes. Launch plain cmd without /c if you want the window to stay open.
Does running cmd as administrator give me full control of the PC?
It gives that window administrator rights for the session, which is broad but still subject to Windows security policies, file permissions and any management restrictions set by your organization.
Can I elevate a Command Prompt from Windows Terminal?
Yes. Open Windows Terminal normally, then use the same PowerShell launch command to start an elevated cmd process, or use the terminal's own option to run a new tab as administrator where that option is offered.
Why does the prompt ask for another user's password?
Because your signed-in account is a standard user. Windows requires an administrator's credentials to approve elevation in that case.