RunAs

Create a shortcut with the following target if you are using Window Vista/7/8 or Server 2008/R2/2012:

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -command "& {Start-Process $psHome\powershell.exe -argumentlist '-windowstyle hidden -executionpolicy bypass -file C:\Temp\RunAs.ps1' -Verb RunAs}"

Create a shortcut with the following target if you are using Window XP or Server 2003:

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -windowstyle hidden -file C:\Temp\RunAs.ps1

 

Replace C:\Temp\RunAs.ps1 with the path where you placed your script.

Anonymous