Created
May 23, 2019 01:14
-
-
Save BinarSkugga/82cbc6a33969ad8f9c4cb897e3091b5d to your computer and use it in GitHub Desktop.
Context menu option to open PowerShell as admin at the location pointed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\Powershell_admin] | |
@="Open PowerShell Here (Administrator)" | |
"Icon"="C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe" | |
[HKEY_CLASSES_ROOT\Directory\shell\Powershell_admin\command] | |
@="\"C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe\" -Command \"&{Start-Process C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -ArgumentList '-NoExit -Command &{cd \\\"%1\\\"}' -Verb RunAs}\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment