How to Open Command Prompt as Administrator
Windows 11; Windows 10 differences noted where they exist · Last checked · Suggest an edit
https://instructions.wiki/windows/open-command-prompt-as-administrator
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.