如何在 Windows 中以管理员身份运行 PowerShell 或命令提示符?
解决方案 1
1. Click on the Start button or 搜索 and enter CMD or PowerShell;
2. On available items, Right Mouse Button click and select Run as administrator.
解决方案 2
1. Press Ctrl+Shift+Escape at the same time. Task Manager windows will appear;
Or
1. Right Mouse Button click on the taskbar and select Task Manager;
Or
1. Press Ctrl+Alt+删除 at the same time and click on Task Manager
2. In Task Manager 导航到 File\Run new task;
3. In the new window select Create this task with administrative privileges, enter 指令管理系统 或者 Powershell, 然后单击 好的;
笔记: IF you enter powershell ise, then run PowerShell ISE, by default (powershell) runing PowerShell console.
解决方案 3
1. Navigate to folder, where stored *.exe files;
命令提示符 (指令管理系统):
C:\WINDOWS\system32\cmd.exe
Windows PowerShell:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Windows PowerShell ISE:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe
笔记: There are also powershell.exe.xml and powershell_ise.exe.xml, don’t run them, run files with PowerShell icons.
2. Right Mouse button click at *.exe file and select Run as administrator.
解决方案 4
If you use Windows 10 发布 1703 及以上:
Right Mouse button click on Start button and select Windows PowerShell (Admin);
笔记: In Windows Server available Command Prompt is like in Windows 1607 及以上. 还, you replace Windows PowerShell with Command Prompt in Windows Settings.
If you know other solutions – let me know in the comments.