Running a command as Administrator using PowerShell?

后端 未结 26 3251
粉色の甜心
粉色の甜心 2020-11-22 09:41

You know how if you\'re the administrative user of a system and you can just right click say, a batch script and run it as Administrator without entering the administrator p

26条回答
  •  执念已碎
    2020-11-22 10:14

    A number of the answers here are close, but a little more work than needed.

    Create a shortcut to your script and configure it to "Run as Administrator":

    • Create the shortcut.
    • Right-click shortcut and open Properties...
    • Edit Target from to powershell
    • Click Advanced... and enable Run as administrator

提交回复
热议问题