用 PowerShell 查看 Defender 威胁检测记录

Get-MpThreatDetection 能查到 Windows 安全中心界面不显示的完整检测历史。

WindowsDefenderPowerShell审计低风险
运行 Get-MpThreatDetection 列出全部历史检测记录;用 Get-MpThreat 把 ThreatID 解析为名称和严重级别。

01命令

命令
$ Get-MpThreatDetection | Sort-Object InitialDetectionTime -Descending | Select-Object -First 10 InitialDetectionTime, ProcessName, Resources, ThreatID

02作用说明

Windows 安全中心只显示最近的威胁,而 Get-MpThreatDetection 保留更长的历史,包含文件路径、触发进程和检测时间。把 ThreatID 传给 Get-MpThreat 即可解析出可读的威胁名称和严重级别。当你怀疑几天前有文件被隔离而界面上一片空白时,这是最快的审计途径。

03风险

风险低风险

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • Get-MpThreatDetection (Defender module)
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Documents Get-MpThreatDetection returning past malware detections with timestamps, resources and threat IDs.
  • Get-MpThreat (Defender module)
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Documents Get-MpThreat, which pairs with Get-MpThreatDetection to translate ThreatID values into threat names and severity.

最后验证: 2026-09-17 · 分类: 安全与隐私

06相关方案