Many Command Prompt operations that make any changes to the system require Administrator rights. Most of the power users always need to run the command line as Admin. Most of the commands are blocked while running the command line as a simple user so to provide more power to the users and to run scripts and higher-level commands, you can make the Command Prompt to always run as Admin rather than opening the Command Prompt as Administrator through the context menu.
There is a trick that can always run the Command Prompt and PowerShell as Admin but the only limitation is that you have to run the Command Prompt from that specific shortcut that is created to run it with Administrator Privileges. All it requires is to take ownership of the executables of PowerShell and Command Prompt.
Running the Command Prompt always as Administrator
To run Command Prompt always as Administrator, it requires just a few steps to follow.
- First of all, pin the Command Prompt or PowerShell to the Start Menu or to Taskbar for quick access.
- Now right-click the pinned CMD or PowerShell and open More > Open File Location. It will open up the location of the Command Prompt shortcut.
- Right Click the shortcut icon in the file explorer and open Properties from the context menu.
- From the Properties window, Go to the Shortcut tab and click on the Advanced button.
- Select “Run as Administrator” option and click OK button to submit the changes and then Apply button to finalize the changes and close the Properties Windows.
- Now whenever you open the Command Prompt or PowerShell from that specific password, it will run the CMD or PowerShell with Administrator rights with User Account Control prompt to access permissions.
This will save time if you frequently open up Command Prompt with Administrator privileges. You may also like to know about Opening a Folder in Command Prompt