Well, in today’s post, we will learn how to always run Command Prompt, PowerShell, or Windows Terminall as administrator. We will create desktop shortcuts to make Command Prompt and PowerShell run as administrators every time we open it. For Terminal, we will change a setting.
How to always run Command Prompt as Administrator
You have two options to always run an elevated CMD.
1] Create an elevated Desktop Shortcut For Command Prompt
To create a shortcut for Command Prompt, go to the Desktop.
Right-click on the desktop > New > New Shortcut.Type cmd.exe in the box. Finish the shortcut wizard and you will see a Command Prompt shortcut on your desktop.Once created, right-click on the shortcut and go to Properties.Click on Advanced and it will open a new pop-up window.Check the box saying, “Run as administrator”Click OK and then Apply.
Now you can open Command Prompt with just a single click. While you can disable UAC – it is not recommended at all as it could put your computer at a security risk.
2] Change Advanced properties of CMD.exe
If you don’t want to create a shortcut for Command Prompt on your desktop, you can just change the Properties of CMD.exe and pin it to your taskbar.
Click on the Windows icon on your screen and Type cmdClick on Open File Location.Right-click on Command Prompt (cmd.exe) and go to the Properties.Click on the Advanced tab and check the box saying, “Run as administrator”Click on OK then Apply and then again OK.
Go to Start again and type CMD Click on Pin to taskbar and you are done. You will get a Command Prompt shortcut in your taskbar and it will always run with the administrative privileges.
How to Always Run PowerShell as an Administrator
You again have two options to always run an elevated PowerShell prompt.
1] Create a desktop shortcut
Just as we did for Command Prompt, you can do the same with PowerShell as well. We will create a PowerShell shortcut on our desktop and make it run always with administrator privileges. To create a shortcut for PowerShell on the desktop, go to the Desktop.
2] Change Advanced properties of powershell.exe
Same as we did with Command Prompt above, type PowerShell in your Windows Search box and open the file location. Right-click on PowerShell > Properties > Advanced. Check the box saying, “Run and administrator” Click OK then Apply and again OK. Open PowerShell from your Search Box again and click on Pin to taskbar. You are done. You will now see a PowerShell icon in your taskbar and every time you click it you can open PowerShell with the administrator privileges.
How to Always Run Terminal as Administrator
To always run Terminal as an administrator follow these steps: Hope this helps.