Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run PowerShell with admin privileges from current folder?

How can I run PowerShell from Context menu (holding the shift key) in current folder with admin privileges? Is there a simpler way than type in any code to windows registry?

like image 791
Dominik Avatar asked Nov 14 '16 22:11

Dominik


People also ask

How do I run PowerShell with administrator privileges?

You can open Windows PowerShell with administrator privileges from Run. First, press Windows+R to open Run, and then type “powershell” in the text box. Next, press Ctrl+Shift+Enter. Windows PowerShell will open in admin mode.

How do I open PowerShell as administrator at current folder in file explorer Windows 10?

You can do this with the native method by simply clicking in the folder you wish to open Powershell as administrator from File Explorer, and then press Alt F S A one key right after the other.


1 Answers

As LotPings mentions in the comments, you can add a simple shortcut to the Quck Access Toolbar if you are running Windows 10. It's supported by Windows by default.

This image should explain how to set it up. Shortcut powershell-admin

While this doesn't use shift, you still have a quick way of starting PowerShell in the current directory as admin.

like image 120
Jonas Andersen Avatar answered Oct 22 '22 07:10

Jonas Andersen