Automatic Maintenance Random Delay
Délai aléatoire de maintenance automatique
Explanation
This policy setting allows you to configure Automatic Maintenance activation random delay.
The maintenance random delay is the amount of time up to which Automatic Maintenance will delay starting from its Activation Boundary.
If you enable this policy setting, Automatic Maintenance will delay starting from its Activation Boundary, by upto this time.
If you do not configure this policy setting, 4 hour random delay will be applied to Automatic Maintenance.
If you disable this policy setting, no random delay will be applied to Automatic Maintenance.
Ce paramètre de stratégie vous permet de configurer le délai aléatoire d’activation de la maintenance automatique.
Le délai aléatoire de la maintenance représente le délai maximal de démarrage de la maintenance automatique à partir de sa limite d’activation.
Si vous activez ce paramètre de stratégie, le démarrage de la maintenance automatique à partir de sa limite d’activation est retardé, en fonction de ce délai.
Si vous ne configurez pas ce paramètre de stratégie, un délai aléatoire de 4 heures est appliqué à la maintenance automatique.
Si vous désactivez ce paramètre de stratégie, aucun délai aléatoire n’est appliqué à la maintenance automatique.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Task Scheduler\Maintenance- Value name
Randomized
| 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: msched/RandomDelayPolicy
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Task Scheduler\Maintenance'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Randomized' -Value 1 -Type DWord
# Regular maintenance random delay
Set-ItemProperty -Path $k -Name 'Random Delay' -Value '<value>' -Type StringDisable
# Disable: msched/RandomDelayPolicy
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Task Scheduler\Maintenance'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Randomized' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": msched/RandomDelayPolicy
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Task Scheduler\Maintenance'
Remove-ItemProperty -Path $k -Name 'Randomized' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'Random Delay' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Regular maintenance random delayDélai aléatoire de la maintenance classiqueRandomDelay | Text boxtext | Random Delay | REG_SZ | Default (UI): PT4H |