解决 Microsoft Defender 防病毒显示已关闭的问题
最近发现 Microsoft Defender 防病毒显示已关闭,实际是开着的。于是请豆包协助排查解决:
核心修复命令(按顺序执行)
以下命令需在管理员 PowerShell 中运行(右键 "开始"→"终端 (管理员)"):
1. 重置安全中心界面应用
Get-AppxPackage Microsoft.SecHealthUI | Reset-AppxPackage2. 用 Defender 官方命令重新启用
# 版本号以 C:\ProgramData\Microsoft\Windows Defender\Platform\ 下的实际目录为准
& "C:\ProgramData\Microsoft\Windows Defender\Platform\4.18.26080.3-0\MpCmdRun.exe" -wdenable3. DISM 组件存储修复(关键步骤,需联网,耗时约 10-30 分钟)
DISM.exe /Online /Cleanup-Image /RestoreHealth4. SFC 系统文件完整性检查
sfc.exe /scannow5. 重启电脑
6. 若安全中心数据库仍为空,手动启动安全中心服务
sc.exe start wscsvc
# 验证:
Get-CimInstance -Namespace 'root\SecurityCenter2' -ClassName AntiVirusProduct诊断命令(排查时用)
# 服务状态
Get-Service WinDefend, SecurityHealthService, wscsvc
# Defender 引擎状态
Get-MpComputerStatus
# 安全中心提供程序登记(是否能看到 Windows Defender)
Get-CimInstance -Namespace 'root\SecurityCenter2' -ClassName AntiVirusProduct
# 检查是否有禁用策略(值为 0/不存在 = 正常)
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows Defender' | Select DisableAntiVirus, PassiveMode关键说明
- 所有命令都无破坏性,不涉及注册表修改,安全可分享
- 第 3 步 DISM 是关键 —— 你的问题根因是 9/9 系统更新损坏了组件存储,DISM 检测到损坏并还原后,重启即恢复正常
- 执行时如遇 UAC 弹窗请点 "是";
sc start wscsvc成功后会看到STATE: 4 RUNNING,随后AntiVirusProduct查询应返回Windows Defender(productState 含启用位)