Skip to content

Instantly share code, notes, and snippets.

@ludolara
ludolara / SuperScript
Last active February 23, 2021 23:44 — forked from MILKTON/SuperScript
Abrir "aquí" PowerShell como administrador
$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 '' }