How to open CMD in a folder as administrator on Windows 11

This step-by-step tutorial will show you how to open Terminal, Command Prompt, or PowerShell in a specific folder as administrator on Windows 11.

How to open Command Prompt or PowerShell in a folder as administrator on Windows 11

  1. First, you'll have to change two settings. To do so, open Windows Terminal.
    Open Windows Terminal
  2. Click the drop-down arrow located next to the tabs.
    Windows Terminal drop-down menu button
  3. Click Settings.
    Open Windows Terminal settings
  4. At 'Default profile', select Command Prompt or PowerShell.
    Select default profile in Terminal
  5. In the 'Profiles' section in the left menu, click Command Prompt or PowerShell, depending on what you've selected in the previous step.
    Command Prompt profile settings in Terminal
  6. Turn on the Run this profile as Administrator option.
    Run this profile as Administrator option in Terminal
  7. Click Save at the bottom of the window.
    Terminal settings save button
  8. Close the Terminal window.
  9. Open File Explorer.
  10. Right-click the folder.
  11. Click Open in Terminal.
    Open CMD in a folder as administrator

Windows 11 will open Command Prompt or PowerShell in the folder as administrator.


Windows


Related:

Remove the PowerShell update message in Terminal & PowerShell