[windows] disabling windows defender scheduled task (#8285)
it turned out that windows defender creates deleted tasks. proper way of disabling is Set-MpPreference -ScanScheduleDay 8
This commit is contained in:
@@ -17,6 +17,7 @@ $avPreference = @(
|
|||||||
@{SubmitSamplesConsent = 2}
|
@{SubmitSamplesConsent = 2}
|
||||||
@{ScanAvgCPULoadFactor = 5; ExclusionPath = @("D:\", "C:\")}
|
@{ScanAvgCPULoadFactor = 5; ExclusionPath = @("D:\", "C:\")}
|
||||||
@{DisableRealtimeMonitoring = $true}
|
@{DisableRealtimeMonitoring = $true}
|
||||||
|
@{ScanScheduleDay = 8}
|
||||||
)
|
)
|
||||||
|
|
||||||
$avPreference += @(
|
$avPreference += @(
|
||||||
@@ -29,9 +30,6 @@ $avPreference | Foreach-Object {
|
|||||||
Set-MpPreference @avParams
|
Set-MpPreference @avParams
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Disable Windows Defender scheduled tasks"
|
|
||||||
Get-ScheduledTask -TaskPath '\Microsoft\Windows\Windows Defender\' | Disable-ScheduledTask | Out-Null
|
|
||||||
|
|
||||||
# https://github.com/actions/runner-images/issues/4277
|
# https://github.com/actions/runner-images/issues/4277
|
||||||
# https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/microsoft-defender-antivirus-compatibility?view=o365-worldwide
|
# https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/microsoft-defender-antivirus-compatibility?view=o365-worldwide
|
||||||
$atpRegPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Advanced Threat Protection'
|
$atpRegPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Advanced Threat Protection'
|
||||||
|
|||||||
Reference in New Issue
Block a user