V2 Quick Tip: Starting a new elevated process from a PowerShell script

PowerShell Team

One of the systems administration hurdles of the post-Vista world is figuring out how to make a script run as an administrator.

In PowerShell V2, using the Start-Process cmdlet, this is a one liner that will get the job done:

Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "Get-Process"'

Hope this Helps,

James Brundage [MSFT]

0 comments

Discussion is closed.

Feedback usabilla icon