Windows Admin Command Prompt: How to Open and Use It
In this article
To open an elevated Command Prompt in Windows, click Start, type cmd, right-click Command Prompt and choose Run as administrator, then select Yes on the User Account Control prompt. That gives you a window with full administrator rights, which is what most system-level commands need. This guide covers opening it safely, running common admin commands, and fixing the usual problems.
What You'll Need
- A Windows 10 or Windows 11 PC (the steps are nearly identical; where they differ it is noted).
- An account with administrator rights. Standard accounts will see the UAC prompt ask for an admin password or be blocked.
- Knowledge of the exact command you intend to run. Admin Command Prompt can change or delete system files, so only run commands you understand.
Step-by-Step
- Open the Start menu. Click the Start button or press the Windows key.
- Search for Command Prompt. Type cmd. In Windows 11 you may need to click the search icon first; in Windows 10 the search box is on the taskbar.
- Right-click the result. In the search results, right-click Command Prompt (it may appear under “Best match”). Do not left-click it, or it opens without admin rights.
- Choose “Run as administrator.” Select that option from the context menu.
- Approve the UAC prompt. Click Yes. If you are signed in with a standard account, enter an administrator’s username and password instead.
- Confirm you are elevated. The window title bar should read Administrator: Command Prompt. If it only says “Command Prompt,” close it and repeat steps 3–5.
- Run your command. Type the command and press Enter. For example, ipconfig /all shows full network details, and sfc /scannow checks and repairs protected system files. Wait for the command to finish before closing the window.
- Close the window when done. Type exit and press Enter, or click the X. Admin rights end when the window closes.
Menu labels can differ slightly by Windows version, edition and region, but the Start-search-then-right-click route works on both Windows 10 and Windows 11. On Windows 11, the built-in Terminal app may open instead of the classic console; the same commands work there, and you can still right-click and choose Run as administrator.
Common Mistakes
- Left-clicking instead of right-clicking. This opens a normal window without elevation, and commands like sfc /scannow or netsh changes will fail with “access denied.”
- Ignoring the title bar. Always check that “Administrator:” appears before running anything that modifies the system.
- Pasting commands from unknown websites. Admin Command Prompt can wipe disks or change boot settings. Only run commands from Microsoft’s own documentation or a source you trust.
- Closing the window mid-command. Interrupting a repair or disk command can leave things in a half-finished state. Let it complete.
- Confusing Command Prompt with PowerShell. They are different tools. Many commands overlap, but some syntax differs. If a guide says PowerShell, open PowerShell as administrator instead.
- Assuming “Run as administrator” grants a different user. It elevates your current account; it does not switch you to the built-in Administrator account.
Tips
- Press the Up arrow to recall previous commands instead of retyping them.
- Use Tab to auto-complete file and folder names as you type paths.
- Right-click inside the window to paste; Ctrl+V also works in current Windows versions.
- Run cmd /? to see the command-line switches for Command Prompt itself, and add /? after most commands (for example ipconfig /?) to see their options.
- Keep a note of what you changed. Admin commands often have no undo button.
- If you only need to view information, a normal (non-admin) Command Prompt is safer and enough for commands like ipconfig or ping.
Troubleshooting
- “Run as administrator” is missing. Your account is probably a standard user. Sign in with an administrator account, or ask the PC’s admin to enter credentials at the UAC prompt.
- UAC prompt does not appear. Restart the PC and try again. If it still does not appear, your account may not be in the Administrators group; check with an admin.
- “Access is denied.” The window is not elevated. Close it and reopen using steps 3–5, checking the title bar.
- Command not recognized. Check spelling and spacing. Some commands only exist in PowerShell, and some require a specific Windows edition.
- Window closes immediately. This can happen if a startup script is misconfigured. Try opening Command Prompt from the Start search as above rather than a shortcut, and check any customized shortcut properties.
- System feels unstable after a command. Restart the PC. If problems persist, use System Restore from the Windows recovery options, and avoid repeating the command until you know what it changed.
Frequently Asked Questions
Is Command Prompt the same as PowerShell?
No. They are separate tools with overlapping but not identical commands. Command Prompt runs classic commands; PowerShell runs cmdlets and scripts. Both can be opened as administrator.
Do I need admin rights for every command?
No. Viewing information such as ipconfig or ping works in a normal window. Commands that change system settings, repair files or modify network configuration need elevation.
How do I know the window is elevated?
The title bar shows Administrator: Command Prompt (or Administrator: Windows PowerShell). If that prefix is missing, you are not elevated.
Can I use Command Prompt to reset my network?
Yes, commands such as ipconfig /release, ipconfig /renew and ipconfig /flushdns are standard, but they need an elevated window. They only affect network settings, not personal files.
Does closing the window undo my changes?
No. Changes made by admin commands persist after the window closes. That is why you should only run commands you understand.
Why does Windows 11 open Terminal instead?
Windows 11 can route Command Prompt and PowerShell to the Terminal app. The commands work the same; right-click the result and choose Run as administrator to elevate it.