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

后端 未结 23 1600
既然无缘
既然无缘 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:41

    I ran into the same problem and the only way I was able to open the CMD as administrator from CMD was doing the following:

    1. Open CMD
    2. Write powershell -Command "Start-Process cmd -Verb RunAs" and press Enter
    3. A pop-up window will appear asking to open a CMD as administrator

提交回复
热议问题