Update Detect-ActiveDesktop.ps1

This commit is contained in:
2026-03-23 05:11:49 +00:00
parent 9dcc0d94ea
commit e08ccb7de4
+4 -2
View File
@@ -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
}