-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDRMM-WINSCR-DefenderStatus.ps1
More file actions
31 lines (26 loc) · 942 Bytes
/
DRMM-WINSCR-DefenderStatus.ps1
File metadata and controls
31 lines (26 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<#
.SYNOPSIS
Using Datto RMM, check Windows defender status. Intended to use alongside your thirdparty AVto ensure that Defender on servers is not running
and thus not causing any issues.
https://learn.microsoft.com/en-us/defender-endpoint/microsoft-defender-antivirus-compatibility?view=o365-worldwide#antivirus-protection-without-defender-for-endpoint
Alert if Defender is running, otherwise return OK status.
Written by Lee Mackie - 5G Networks
.NOTES
Version 1.0 - Initial release
#>
function Write-DRMMAlert ($message) {
write-host '<-Start Result->'
write-host "Alert=$message"
write-host '<-End Result->'
}
function Write-DRMMStatus ($message) {
write-host '<-Start Result->'
write-host "STATUS=$message"
write-host '<-End Result->'
}
if ($(Get-MpComputerStatus).AMRunningMode -eq "Normal") {
Write-DRMMAlert "BAD: Defender running"
Exit 1
} else {
Write-DRMMStatus "OK: Defender not running"
}