Specify deadline for automatic updates and restarts for quality update
Specify deadline for automatic updates and restarts for quality update
Explication
This policy lets you specify the number of days before quality updates are installed on devices automatically, and a grace period after which required restarts occur automatically.
Set deadlines for quality updates to meet your compliance goals. Updates will be downloaded and installed as soon as they are offered and automatic restarts will be attempted outside of active hours. Once the deadline has passed, restarts will occur regardless of active hours, and users will not be able to reschedule. If the deadline is set to 0 days, the update will be installed immediately upon offering, but might not finish within the day due to device availability and network connectivity.
Set a grace period for quality updates to guarantee users a minimum time to manage their restarts once updates are installed. Users will be able to schedule restarts during the grace period and Windows can still automatically restart outside of active hours if users choose not to schedule restarts. The grace period might not take effect if users already have more than the number of days set as grace period to manage their restart, based on deadline configurations.
You can set the device to delay restarting until both the deadline and grace period have expired.
If you disable or do not configure this policy, devices will get updates and will restart according to the default schedule.
This policy will override the following policies:
1. Specify deadline before auto restart for update installation
2. Specify Engaged restart transition and notification schedule for updates
3. Always automatically restart at the scheduled time
4. Configure Automatic Updates
This policy lets you specify the number of days before quality updates are installed on devices automatically, and a grace period after which required restarts occur automatically.
Set deadlines for quality updates to meet your compliance goals. Updates will be downloaded and installed as soon as they are offered and automatic restarts will be attempted outside of active hours. Once the deadline has passed, restarts will occur regardless of active hours, and users will not be able to reschedule. If the deadline is set to 0 days, the update will be installed immediately upon offering, but might not finish within the day due to device availability and network connectivity.
Set a grace period for quality updates to guarantee users a minimum time to manage their restarts once updates are installed. Users will be able to schedule restarts during the grace period and Windows can still automatically restart outside of active hours if users choose not to schedule restarts. The grace period might not take effect if users already have more than the number of days set as grace period to manage their restart, based on deadline configurations.
You can set the device to delay restarting until both the deadline and grace period have expired.
If you disable or do not configure this policy, devices will get updates and will restart according to the default schedule.
This policy will override the following policies:
1. Specify deadline before auto restart for update installation
2. Specify Engaged restart transition and notification schedule for updates
3. Always automatically restart at the scheduled time
4. Configure Automatic Updates
Cas d'usage
Fixe, pour les mises à jour qualité, l’échéance (en jours depuis la détection par le poste) et la période de grâce après l’entrée en attente de redémarrage ; une fois l’échéance effective passée, le poste redémarre quelles que soient les heures d’activité. C’est le levier moderne pour garantir un niveau de correctifs.
Valeurs par défaut citées par Microsoft : 1 jour d’échéance et 2 jours de grâce ; la somme report + échéance + grâce ne devrait pas dépasser 7 jours après la publication. Des valeurs trop courtes réduisent le temps pendant lequel l’utilisateur voit les notifications.
Sources Microsoft : Enforcing compliance deadlines for updates · Update policies
Registre
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate- Nom de la valeur
SetComplianceDeadlineForQU
| État | Valeur écrite |
|---|---|
| Activé | REG_DWORD = 1 |
| Désactivé | REG_DWORD = 0 |
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Activer
# Activer : WindowsUpdate/ComplianceDeadline
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SetComplianceDeadlineForQU' -Value 1 -Type DWord
# Échéance (jours)
# Options possibles :
# 0 = 0; 1 = 1; 2 = 2; 3 = 3; 4 = 4; 5 = 5; 6 = 6; 7 = 7; 8 = 8; 9 = 9; 10 = 10; 11 = 11
# 12 = 12; 13 = 13; 14 = 14; 15 = 15; 16 = 16; 17 = 17; 18 = 18; 19 = 19; 20 = 20; 21 = 21
# 22 = 22; 23 = 23; 24 = 24; 25 = 25; 26 = 26; 27 = 27; 28 = 28; 29 = 29; 30 = 30
Set-ItemProperty -Path $k -Name 'ConfigureDeadlineForQualityUpdates' -Value 7 -Type DWord
# Période de grâce (jours)
# Options possibles :
# 0 = 0
# 1 = 1
# 2 = 2
# 3 = 3
# 4 = 4
# 5 = 5
# 6 = 6
# 7 = 7
Set-ItemProperty -Path $k -Name 'ConfigureDeadlineGracePeriod' -Value 2 -Type DWord
# Don't auto-restart until end of grace period
# valeur non définie dans l'ADMX (l'éditeur GPO écrit en général 1/0)
# 1 = coché, 0 = décoché ; état par défaut de la case repris de l’ADML
Set-ItemProperty -Path $k -Name 'ConfigureDeadlineNoAutoRebootForQualityUpdates' -Value 0 -Type DWordDésactiver
# Désactiver : WindowsUpdate/ComplianceDeadline
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SetComplianceDeadlineForQU' -Value 0 -Type DWordRevenir à « Non configuré »
# Revenir à « Non configuré » : WindowsUpdate/ComplianceDeadline
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
Remove-ItemProperty -Path $k -Name 'SetComplianceDeadlineForQU' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'ConfigureDeadlineForQualityUpdates' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'ConfigureDeadlineGracePeriod' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'ConfigureDeadlineNoAutoRebootForQualityUpdates' -ErrorAction SilentlyContinueOptions (3)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Échéance (jours):Deadline (days):ConfigureDeadlineForQualityUpdates | Liste déroulanteenum | ConfigureDeadlineForQualityUpdates | REG_DWORD | Obligatoire · Choix par défaut (interface) : n° 7
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Période de grâce (jours):Grace period (days):ConfigureDeadlineGracePeriod | Liste déroulanteenum | ConfigureDeadlineGracePeriod | REG_DWORD | Obligatoire · Choix par défaut (interface) : n° 2
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Don't auto-restart until end of grace periodConfigureDeadlineNoAutoRebootForQualityUpdates | Case à cocherboolean | ConfigureDeadlineNoAutoRebootForQualityUpdates | REG_DWORD | Défaut (interface) : false Coché : implicite : 1Décoché : implicite : 0 |