Files
node-problem-detector/config/plugin/windows_defender_problem.ps1
2021-05-12 20:28:33 +00:00

11 lines
293 B
PowerShell

# This plugin checks to see if windows defender detects any threats to the node.
$windowsDefenderThreats = (Get-MpThreat | Where-Object {$_.IsActive -or $_.DidThreatExecute})
if ($windowsDefenderThreats.length -ne 0) {
Write-Host $windowsDefenderThreats
exit 1
} else {
exit 0
}