Update Detect-ActiveDesktop.ps1
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
|
#This works only if Defender has not been disabled on the system.
|
||||||
|
|
||||||
$proc = Get-Process -Name SecurityHealthSystray -ErrorAction SilentlyContinue
|
$proc = Get-Process -Name SecurityHealthSystray -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
if ($null -ne $proc) {
|
if ($null -ne $proc) {
|
||||||
Write-Output "ESP-not-active"
|
Write-Output "desktop-not-active"
|
||||||
exit 0
|
exit 0
|
||||||
} else {
|
} else {
|
||||||
Write-Output "ESP-active"
|
Write-Output "desktop-active"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user