Randomize scheduled task times
Rendre aléatoires les heures des tâches planifiées
Explanation
This policy setting allows you to configure the randomization of the scheduled scan start time and the scheduled definition update start time.
If you enable or do not configure this policy setting, and did not set a randomization window in the Configure scheduled task time randomization window setting , then randomization will be added between 0-4 hours.
If you enable or do not configure this policy setting, and set a randomization window in the Configure scheduled task time randomization window setting, the configured randomization window will be used.
If you disable this policy setting, but configured the scheduled task time randomization window, randomization will not be done.
Ce paramètre de stratégie vous permet de configurer la randomisation de l’heure de début de l’analyse planifiée et de l’heure de début de la mise à jour de définition planifiée.
Si vous activez ou ne configurez pas ce paramètre de stratégie, et si vous n’avez pas défini de fenêtre de randomisation dans le paramètre Configurer la randomisation de l’heure planifiée des tâches, la randomisation est ajoutée entre 0 et 4 heures.
Si vous activez ce paramètre de stratégie ou si vous ne le configurez pas, et si vous définissez une fenêtre de randomisation dans le paramètre Configurer la randomisation de l’heure planifiée des tâches, la fenêtre de randomisation configurée est utilisée.
Si vous désactivez ce paramètre de stratégie, mais que vous avez configuré la fenêtre de randomisation de l’heure planifiée des tâches, la randomisation n’est pas effectuée.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender- Value name
RandomizeScheduleTaskTimes
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: WindowsDefender/RandomizeScheduleTaskTimes
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RandomizeScheduleTaskTimes' -Value 1 -Type DWordDisable
# Disable: WindowsDefender/RandomizeScheduleTaskTimes
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RandomizeScheduleTaskTimes' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsDefender/RandomizeScheduleTaskTimes
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
Remove-ItemProperty -Path $k -Name 'RandomizeScheduleTaskTimes' -ErrorAction SilentlyContinue