PowerShell
# Auto Elevate
if ($args[0] -ne "Admin") {
Start-Process `
-FilePath "powershell.exe" `
-WorkingDirectory (Get-Location) `
-ArgumentList "-ExecutionPolicy", "Bypass", "-File", "`"$PSCommandPath`"", "Admin" `
-Verb "RunAs" `
-Wait
exit
}
# Everything past this point will run as administrator.