mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-03-02 17:50:34 +00:00
11 lines
293 B
PowerShell
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
|
|
}
|