# 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. Enjoy! # version: 0.1 # type: function # author: Peter Provost # license: CC0 # function: elevate-process # x-poshcode-id: 695 # x-archived: 2017-03-12T06:20:40 # x-published: 2009-12-02T10:12: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;