Skip to main content

Powershell Sudo (sort of) for Vista UAC

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

URL Tag Cloud

Bookmark History

Saved by 1 people (0 private), first by anonymouse user on 2008-05-13


Public Sticky notes

Wes Haggard sent me an email this morning that caused me to "slap myself upside the head":

Why got through this trouble when you can just user Process.Start?

PS> $psi = new-object System.Diagnostics.ProcessStartInfo "notepad.exe"
PS> $psi.Verb = "runas"
PS> [System.Diagnostics.Process]::Start($psi)

Oops. My bad. Hahaha... can't believe I didn't try that. :)

Highlighted by fmavituna

Readers (1)