Skip to content

Instantly share code, notes, and snippets.

@janbaer
Created March 30, 2013 09:59
Show Gist options
  • Save janbaer/5276178 to your computer and use it in GitHub Desktop.
Save janbaer/5276178 to your computer and use it in GitHub Desktop.
Restart your current powershell console as Administrator
function adminMode() {
Start-Process -FilePath "$PSHOME\powershell.exe" -Verb runas -WorkingDirectory $PWD.Path
Exit
}
Set-Alias -Name "elevated" -Value "adminMode"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment