When right-click a .ps1 file and select "Run with Powershell", the .ps1 file will be run in powershell with no elevation. And "Run this program as administrator" checkbox grayed out in the properties of Powershell.exe, no matter
UAC is on or off. So I have to run Powershell as Administrator and them open .ps1 file to run it. Is there a way to "Run with Powershell" and Run as administrator at the same time? Thanks.
↧