From e08ccb7de402be44055d2db6da0c439a44619eb5 Mon Sep 17 00:00:00 2001 From: samsamfin Date: Mon, 23 Mar 2026 05:11:49 +0000 Subject: [PATCH] Update Detect-ActiveDesktop.ps1 --- Detect-ActiveDesktop.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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