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
Press the Windows Key to open the Start Menu and search for either cmd or powershell.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 + EnterIt 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: Press the Windows Key to open the Start Menu
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? Also see:
3 Ways To Run MSC Files As Administrator4 Ways to Run Task Manager as Administrator in Windows 11/106 Ways To Run Programs As Administrator In Windows 11/104 Ways To Open Command Prompt Window in a Folder In Windows 106 Ways To Open Run Command Box In Windows