+4 votes
83 views
How to open PowerShell as administrator in Windows 11

in Guides by (552k points)
reopened | 83 views

1 Answer

+5 votes
Best answer

Open PowerShell as administrator in Windows 11
How to run it as administrator permanently

It is possible to open PowerShell as an administrator in Windows 11 as many times as we want, we can even configure it so that it always opens with elevated privileges. PowerShell would come to replace the Command Prompt for all command line actions in the operating system. It is part of the Windows Terminal application and we can use it to solve different problems that we have in the OS..

Open PowerShell as administrator in Windows 11

By running PowerShell with administrator permissions in Windows 11, we have the ability to run commands that bypass Windows file protection, such as those used for Windows installation files.

image

What we have to do is press “Start” or the “Windows” key on our keyboard. After this we are going to write “PowerShell” or “Terminal”; Next, we'll choose Run as administrator in the right pane..

image

How do we know it was run as administrator? In the upper bar we will be able to see that it says "Administrator", this means that we have indeed managed to run PowerShell with elevated privileges.

How to run it as administrator permanently

If we want PowerShell to run with administrator privileges at all times, we will have to configure Windows Terminal (which uses PowerShell by default) and to do so we will first have to verify the version of Windows Terminal by typing the following command: Wt -v

image

A small window will open where we can view the version of Terminal that we currently have available..

image

We are going to have to update the version of Windows Terminal to the latest available, for this we simply copy and paste the following command: Winget install –id Microsoft.WindowsTerminal.Preview

image

A text similar to the one we see in the image will appear when it updates successfully.

image

Next, we will right click on the start menu and choose “Windows Terminal”.

image

In the terminal window, at the top, we will press the arrow pointing down and in the menu we will choose "Settings".

image

Right in the "Settings" menu, we go to "Profiles" in the left sidebar and we are going to click on PowerShell. We will have to activate the "Run this profile as administrator" switch and click on "Save".



by (3.5m points)
edited

Related questions

+3 votes
1 answer
+5 votes
1 answer
+4 votes
1 answer
+4 votes
1 answer
+5 votes
1 answer
asked Jul 7, 2020 in Windows 10 by backtothefuture (552k points) | 258 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users