Using the Command Prompt or the Windows PowerShell with regular user rights can be sufficient. But sometimes you might have come across this error:
Access denied as you do not have sufficient privileges
Table of contents
This is because that particular command requires higher privileges which can be achieved by running the Command Prompt or the PowerShell with Administrative Rights. This is also called running PowerShell with elevated PowerShell prompt.
It is important to understand that all commands that can be executed with Standard Privileges can also be executed with Administrative privileges. However, all commands executed with Administrative privileges cannot be executed with Standard privileges.
If you run a lot of PowerShell and command prompt commands that require administrative privileges, you can set PowerShell and Command Prompt to open as administrator by default.
There are several ways to run the PowerShell and the Command Prompt with Administrative privileges. We’ll discuss some of them here.
Running Command Prompt and PowerShell with Administrative Rights
The Conventional Way
Right-Click on the program and click Run as Administrator, and the program should open with Administrative privileges.
Using a keyboard shortcut
This is the most convenient way to open PowerShell as administrator instantly.
Open Run dialog by pressing Windows key + R.
Type cmd to open Command Prompt or powershell to open PowerShell.
Instead of pressing Enter or clicking OK, press the following keys simultaneously:
Ctrl + Shift + Enter
It will launch PowerShell and Command Prompt with administrative privileges.
Always Open with Administrative Privileges
If you want to always open the command prompt of PowerShell in administrative mode, you should follow these steps:
Right-Click on the program and click on Open File Location.
Then right-click on the highlighted shortcut and select Properties.
Under the Shortcut tab, click on Advanced.
In the next window, check Run as Administrator.
Click OK, and then apply the settings.
By performing the tasks above, we have ensured that the relevant program always runs with Administrative privileges. Now a Left-Click from the Start Menu on the program would run it with administrative rights.
For which commands or programs do you use the Administrative privilege for?