Powershell Set-MpP首选项 - 禁用实时监控 $true不起作用



要禁用Windows Defender,我在Windows 10中使用PowerShell(作为管理员(运行以下命令:Set-MpPreference -DisableRealtimeMonitoring $true

但是实时保护并没有被禁用。

任何人都可以知道如何以编程方式禁用实时保护吗?

篡改保护(启用时(可防止"Set-MpP首选项 - 禁用实时监控$true"执行任何操作。

尽管在我的 Windows 10 机器上,Set-MpPreference -DisableRealtimeMonitoring $true按预期工作,但您可以尝试直接在注册表中操作它:

# Windows Defender DisableRealtimeMonitoring
$regpath = "HKLM:SOFTWAREPoliciesMicrosoftWindows Defender"
if (!(Test-Path $regpath -PathType Container)) {
$null = New-Item -Path $regpath -ItemType Container -Force
}
Set-ItemProperty -Path $regpath -Name "DisableRealtimeMonitoring" -Value 1 -Type DWord -Force
# restart the service
Restart-Service  -Name WinDefend -Confirm:$false -Force

若要重新打开它,请删除"禁用实时监视"条目或将其值设置为 DWORD0

我用了按键

控制 + 电调 类型字符串"病毒防护" 进入 标签 x 4 进入 blahblah = 其余按键按下以关闭防御者和防火墙以及卸载 Avast 和 AVG LA

最新更新