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

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] Read More...

Read the complete post at http://blogs.msdn.com/powershell/archive/2009/04/23/v2-quick-tip-starting-a-new-elevated-process-from-a-powershell-script.aspx


Posted Apr 22 2009, 10:23 PM by Windows PowerShell Blog
Filed under: ,
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.