Last active
May 25, 2016 20:09
-
-
Save psycalc/85da506e77d38d76c7de44a5a64b016a to your computer and use it in GitHub Desktop.
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
# Перезапустить скрипт/консоль как администартор с параметрами | |
if(-not([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) | |
{ | |
$Arguments = "& '" + $MyInvocation.MyCommand.Definition + "'" | |
Start-Process powershell -Verb RunAs -ArgumentList $Arguments | |
Break | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment