functions/invoke/Invoke-ElevatedScript.ps1
function Invoke-ElevatedScript { param( [Parameter(Mandatory = $true)] [string]$Script, [Parameter(Mandatory = $false)] [switch]$KeepOpen ) if ($KeepOpen) { $Script += "`npause" } Start-Process 'powershell.exe' $Script -Verb RunAs } |