How to open an elevated cmd using command line for Windows?

后端 未结 23 1601
既然无缘
既然无缘 2020-12-04 06:21

How do I open a elevated command prompt using command lines on a normal cmd?

For example, I use runas /username:admin cmd but the cmd that was opened do

23条回答
  •  再見小時候
    2020-12-04 06:51

    I don't have enough reputation to add a comment to the top answer, but with the power of aliases you can get away with just typing the following:

    powershell "start cmd -v runAs"
    

    This is just a shorter version of user3018703 excellent solution:

    powershell -Command "Start-Process cmd -Verb RunAs"
    

提交回复
热议问题