Skip to content

Instantly share code, notes, and snippets.

@yangyer
Last active January 30, 2016 00:18
Show Gist options
  • Save yangyer/f857776b40f317fd72ac to your computer and use it in GitHub Desktop.
Save yangyer/f857776b40f317fd72ac to your computer and use it in GitHub Desktop.
Powershell sudo
Function Start-ElevatedUAC{
$file, [string]$arguments = $args;
$psi = new-object System.Diagnostics.ProcessStartInfo $file;
$psi.Arguments = $arguments;
$psi.Verb = "runas";
$psi.WorkingDirectory = get-location;
[System.Diagnostics.Process]::Start($psi);
}
Set-Alias fudo Start-ElevatedUAC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment