# encoding: ascii
# api: powershell
# title: elevate-process (sudo)
# description: As a former UNIX guy, I love the non-admin stuff in Vista, but got annoyed keeping two shells open (one admin and one non-admin). I wanted sudo! PowerShell made that easy. Just put this in your $profile script. Enjoy!
# version: 0.1
# type: function
# author: Peter Provost
# license: CC0
# function: elevate-process
# x-poshcode-id: 696
# x-archived: 2017-03-11T01:38:32
# x-published: 2009-12-02T10:14:00
#
#
function elevate-process
{
	$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 sudo elevate-process;
