Elevating the Powershell Command Line
May 27, 2017 powershell
From Powershell
Start a new Powershell process as an Administrator from an existing Powershell command:
Start-Process powershell -Verb runAs
Or with arguments:
Start-Process powershell -Verb runAs -ArgumentList <Arguments>
From the command line
Run the following from a non-powershell command line:
powershell -Command "Start-Process PowerShell –Verb RunAs"
Sources
- StackOveflow - How to run open powershell as administrator from the run window
- StackOverFlow - Powershell running a command as administrator