diff --git a/Detect-ActiveDesktop.ps1 b/Detect-ActiveDesktop.ps1 index 3e3692c..1bbd2e5 100644 --- a/Detect-ActiveDesktop.ps1 +++ b/Detect-ActiveDesktop.ps1 @@ -1,9 +1,11 @@ +#This works only if Defender has not been disabled on the system. + $proc = Get-Process -Name SecurityHealthSystray -ErrorAction SilentlyContinue if ($null -ne $proc) { - Write-Output "ESP-not-active" + Write-Output "desktop-not-active" exit 0 } else { - Write-Output "ESP-active" + Write-Output "desktop-active" exit 0 } \ No newline at end of file