How to Open Command Prompt as Administrator
Open an elevated Command Prompt on Windows 11 or 10 from the Start menu, the Windows + X menu, or the Run box, and get past the UAC prompt.
Some commands, such as sfc /scannow, chkdsk, or anything that changes system files, refuse to run in a normal Command Prompt. They need an elevated window, which Windows labels "Administrator: Command Prompt" in the title bar. There are three ways to open one.
Search for it in the Start menu
Press the Windows key and type cmd. Command Prompt appears as the top result. On the right side of the search panel, click Run as administrator. You can also right-click the result and pick the same option.
Use the Windows + X menu
Press Windows + X, or right-click the Start button. On Windows 11 the menu offers Terminal (Admin). Windows Terminal opens with a PowerShell tab by default; click the down arrow next to the tab and choose Command Prompt to open a Command Prompt tab. Everything in that window is elevated.
On Windows 10 the same menu shows Command Prompt (Admin) or Windows PowerShell (Admin), depending on a setting under Taskbar settings.
Use the Run box with a shortcut
Press Windows + R, type cmd, then press Ctrl + Shift + Enter instead of Enter. That key combination tells Windows to run the program elevated. The same trick works in the Start menu search box.
Approve the UAC prompt
Whichever route you take, a User Account Control dialog asks whether you want to allow the app to make changes to your device. Click Yes. If your account is a standard user rather than an administrator, the dialog asks for an administrator's password instead.
Confirm the window is elevated
The title bar should read Administrator: Command Prompt, and the prompt starts at C:\Windows\System32> rather than your user folder. If it shows your user folder, the window is not elevated; close it and try again.
If you want to pin it. Right-click the Command Prompt result in Start search and choose Pin to taskbar. After that, holding Ctrl + Shift while clicking the taskbar icon opens it as administrator.
More Windows how-tos
- How to Boot into Safe Mode on Windows 11
- How to Change DNS Servers on Windows
- How to Change the Default Browser on Windows 11
- How to Check If a Port Is in Use on Windows
- How to Check Which Windows Version You Have
- How to Check Your PC Specs on Windows
- How to Enable Clipboard History on Windows
- How to Find Your IP Address on Windows
- How to Flush DNS on Windows
- How to Force Quit a Program on Windows
- How to Free Up Disk Space on Windows 11
- How to Map a Network Drive on Windows
- How to Rename Multiple Files at Once on Windows
- How to Show File Extensions in Windows 11
- How to Take a Screenshot on Windows
- How to Turn Off Startup Programs on Windows 11
- How to Turn On Dark Mode on Windows 11
- How to Uninstall a Program on Windows 11
- How to Zip and Unzip Files on Windows