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. :)
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.