使用 Powershell 禁用 UAC [英] Disabling UAC with Powershell

查看:120
本文介绍了使用 Powershell 禁用 UAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Powershell 禁用 UAC(即设置为最低级别).所以我正在运行:

I'm trying to disable UAC (i.e. set to the minimum level) using Powershell. So I'm running:

Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -Value 0

我也试过了,最后添加了 -Force.

I've also tried this with -Force added on the end.

此代码具有将 UAC 设置为最小的预期效果,但也有防止内置 Windows 应用程序(包括 Edge)运行的不良影响,返回应用程序无法使用内置管理员运行的错误帐户(尽管它是使用禁用 UAC 的用户帐户运行的).

This code has the intended effect of setting UAC to minimum but also the undesired effect of preventing built-in Windows applications (including Edge) from running, returning an error that the application can't be run using the built-in administrator account (despite the fact that it's being run with a user account that simply has UAC disabled).

因此,如果有人对为什么会发生这种情况以及如何解决它有一些见解,那将是理想的.否则,如果我可以运行其他 Powershell 命令来禁用 UAC,那么这也值得一试.

So if anyone has some insight as to why this is happening and how to resolve it, that would be ideal. Failing that, if there's an alternative Powershell command I can run to disable UAC then that could also be worth a shot.

推荐答案

看起来像这样:

Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Value 0

Edge 重启后仍在运行,烦人的 UAC 提示消失了,所以认为这是一个胜利.

Edge still running after reboot and annoying UAC prompts gone, so think that's a win.

这篇关于使用 Powershell 禁用 UAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆