Is possible open a new PowerShell console as administrator through the run window, in Windows?
I know that just typing 'powershell' in the run window is enough to start a new console, but is there a parameter to start it 'as Administrator'?
Like:
"powershell /runas:Administrator"
or something?
PS: I'm using Windows 10 -- I don't know if makes any difference.
答案 0 :(得分:29)
在Windows 10(和Windows 8)中打开管理员Powershell窗口的最简单方法是在“高级用户菜单”中添加“Windows Powershell(Admin)”选项。完成后,您可以通过 Win + X , A 或右键单击开始按钮并选择打开admin powershell窗口“Windows Powershell(Admin)”:
[
您可以在此处使用“Windows Powershell”选项替换“命令提示符”选项:
[
答案 1 :(得分:12)
Yes, it is possible to run PowerShell through the run window. However, it would be burdensome and you will need to enter in the password for computer. This is similar to how you will need to set up when you run cmd:
runas /user:(ComputerName)\(local admin) powershell.exe
So a basic example would be:
runas /user:MyLaptop\AMicrosoftAccount@outlook.com powershell.exe
You can find more information on this subject in Runas.
However, you could also do one more thing :
then your system will execute the elevated powershell.
答案 2 :(得分:3)
Windows 10 appears to have a keyboard shortcut. According to How to open elevated command prompt in Windows 10 you can press ctrl + shift + enter from the search or start menu after typing cmd
for the search term.