-
-
Save ludolara/99ec5da3e5d45aa145d75d81bf8b322a to your computer and use it in GitHub Desktop.
Abrir "aquí" PowerShell como administrador
This file contains 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
$menu = 'Administrator PowerShell' | |
$command = "$PSHOME\powershell.exe -NoExit -Command ""Set-Location '%V'""" | |
'directory', 'directory\background', 'drive' | ForEach-Object { New-Item -Path "Registry::HKEY_CLASSES_ROOT\$_\shell" -Name runas\command -Force | Set-ItemProperty -Name '(default)' -Value $command -PassThru | Set-ItemProperty -Path {$_.PSParentPath} -Name '(default)' -Value $menu -PassThru | Set-ItemProperty -Name HasLUAShield -Value '' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment