tshm
9/22/2014 - 9:15 AM

elevate to admin right.

elevate to admin right.

$scriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path
$ErrorActionPreference = "Stop"

function main() {
  sudo
}

function sudo() {
  Start-Process "$PsHome\PowerShell.exe" -Verb RunAs -ArgumentList ('-ExecutionPolicy Unrestricted -file "' + $ScriptPath + '"') -PassThru
}