在 UAC 提示符处确认此操作。请注意,出现了以下消息:
防篡改保护已关闭。您的设备可能容易受到攻击。
现在您可以使用 PowerShell 禁用 Microsoft Defender 实时保护:
Set-MpPreference -DisableRealtimeMonitoring $true
要恢复实时保护,请运行:
Set-MpPreference -DisableRealtimeMonitoring $false
开启云提供的保护:
Set-MpPreference -MAPSReporting 2
如果要完全禁用 Microsoft Defender 中的防篡改功能,则需要更改注册表项 HKLMSOFTWAREMicrosoftWindows DefenderFeatures 下的以下项目:
防篡改 = 4
篡改保护源 = 2
感知开发模式 = 0
您需要使用 NT ServiceTrustedInstaller 权限进行这些更改。
使用 PowerShell 在 Windows Server 2022/2019 上卸载 Windows Defender您可以使用 PowerShell 在 Windows Server 201620192022 上卸载 Windows Defender。首先,停止实时保护并在提升的 PowerShell 会话中运行以下命令:
Uninstall-WindowsFeature -Name Windows-Defender
或者使用DISM工具:
Dism /online /Disable-Feature /FeatureName:Windows-Defender /Remove /NoRestart /quiet
在 Windows 11 或 10 上永久关闭 Microsoft Defender您无法从运行桌面 Windows 版本的计算机上完全卸载 Microsoft Defender 功能。但是,您可以尝试使用DisableAntiSpyware = 1注册表项或使用本地组策略编辑器来完全禁用计算机上的Windows Defender。
New-ItemProperty -Path “HKLM:SOFTWAREPoliciesMicrosoftWindows Defender” -Name DisableAntiSpyware -Value 1 -PropertyType DWORD -Force
Or:
Run the gpedit.msc console;
转到以下 GPO 部分:计算机配置 > 管理模板 > Windows 组件 > Microsoft Defender 防病毒;
在右侧窗格中找到名为“关闭Windows Defender Antivirus”的参数;
将其值更改为启用;