This article explains how to open an elevated Command Prompt in Windows 11, 10, or 8. It also includes instructions for Windows 7 and Vista, along with additional information about why you need an elevated Command Prompt and how to tell if you have administrator privileges.
If you're using a Windows 11, Windows 10, or Windows 8 keyboard, you can quickly open an elevated Command Prompt from the Power User Menu. Simply use the WIN+X keyboard shortcut, and then select Terminal (Admin) (in Windows 11) or Command Prompt (Admin) (in Windows 10/8). Select Yes to any User Account Control messages that may appear.
Another method is to use Task Manager:
Open Task Manager. The quickest way, assuming you're using a keyboard, is to use CTRL+SHIFT+ESC, but there are several other methods described in that link. An easy way is to type task manager into the search bar on the taskbar.