Specify deadline for automatic updates and restarts for quality update
Vérifié avec Windows 11 25H2 — mis à jour le 30 juillet 2026
Pris en charge sur : Windows Server 2016, Windows 10 version 1709 ou versions supérieures
Chemin dans la console GPO
Configuration ordinateur\Modèles d'administration\Composants Windows\Windows Update\Gérer l’expérience utilisateur final Description
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
Registre
Software\Policies\Microsoft\Windows\WindowsUpdate Nom de valeur : SetComplianceDeadlineForQU
Activé : SetComplianceDeadlineForQU = 1
Désactivé : SetComplianceDeadlineForQU = 0
MDM / Intune (CSP)
./Device/Vendor/MSFT/Policy/Config/Update/ConfigureDeadlineForQualityUpdates Plusieurs correspondances CSP possibles ; la première a été retenue.
Documentation Microsoft Learn Données de correspondance : Microsoft Learn (CC BY 4.0)
Générateur d'exports
BETAConfigurez l'état, la portée et les options, puis générez les sorties .reg, PowerShell, Intune et SCCM — ou ajoutez le paramètre à une collection multi-paramètres.
Ces exports écrivent le registre — ce n'est pas une GPO managée. ⓘ
Fichier .reg
Windows Registry Editor Version 5.00
; Exported from gporais.com
; Policy: Specify deadline for automatic updates and restarts for quality update
; State: Enabled
; Supported on: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate]
"SetComplianceDeadlineForQU"=dword:00000001
"ConfigureDeadlineForQualityUpdates"=dword:00000007
"ConfigureDeadlineGracePeriod"=dword:00000002
"ConfigureDeadlineNoAutoRebootForQualityUpdates"=dword:00000000 Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Specify deadline for automatic updates and restarts for quality update
# State: Enabled
# Supported on: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SetComplianceDeadlineForQU' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineForQualityUpdates' -Value 7 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineGracePeriod' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineNoAutoRebootForQualityUpdates' -Value 0 -Type DWord Intune XML
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Update/ConfigureDeadlineForQualityUpdates
Data type: String
Value:
<enabled/>
<data id="ConfigureDeadlineForQualityUpdates" value="7"/>
<data id="ConfigureDeadlineGracePeriod" value="2"/>
<data id="ConfigureDeadlineNoAutoRebootForQualityUpdates" value="0"/> Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Specify deadline for automatic updates and restarts for quality update
# State: Enabled
# Supported on: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetComplianceDeadlineForQU' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ConfigureDeadlineForQualityUpdates' -Expected 7 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ConfigureDeadlineGracePeriod' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ConfigureDeadlineNoAutoRebootForQualityUpdates' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Specify deadline for automatic updates and restarts for quality update
# State: Enabled
# Supported on: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SetComplianceDeadlineForQU' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineForQualityUpdates' -Value 7 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineGracePeriod' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineNoAutoRebootForQualityUpdates' -Value 0 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Specify deadline for automatic updates and restarts for quality update
# State: Enabled
# Supported on: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
# SCCM Configuration Item guidance:
# Create a Configuration Item of type "Setting: Script".
# Discovery script: use the Detection script below.
# Remediation script: use the Remediation script below.
# Compliance rule: the Discovery script output equals 'Compliant'.
# === Detection script ===
# Exported from gporais.com
# Policy: Specify deadline for automatic updates and restarts for quality update
# State: Enabled
# Supported on: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
function Test-RegistryValue {
param(
[Parameter(Mandatory = $true)][string]$Path,
[Parameter(Mandatory = $true)][string]$Name,
[object]$Expected,
[ValidateSet('String', 'DWord', 'MultiString')][string]$Kind = 'String',
[switch]$Absent
)
try {
$item = Get-ItemProperty -LiteralPath $Path -Name $Name -ErrorAction Stop
} catch {
return $Absent.IsPresent
}
if ($Absent.IsPresent) { return $false }
$actual = $item.$Name
if ($Kind -eq 'DWord') { return ([int64]$actual) -eq ([int64]$Expected) }
if ($Kind -eq 'MultiString') {
$actualValues = @($actual)
$expectedValues = @($Expected)
if ($actualValues.Count -ne $expectedValues.Count) { return $false }
for ($i = 0; $i -lt $expectedValues.Count; $i++) {
if ([string]$actualValues[$i] -ne [string]$expectedValues[$i]) { return $false }
}
return $true
}
return [string]$actual -eq [string]$Expected
}
$checks = @(
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'SetComplianceDeadlineForQU' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ConfigureDeadlineForQualityUpdates' -Expected 7 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ConfigureDeadlineGracePeriod' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'ConfigureDeadlineNoAutoRebootForQualityUpdates' -Expected 0 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Specify deadline for automatic updates and restarts for quality update
# State: Enabled
# Supported on: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SetComplianceDeadlineForQU' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineForQualityUpdates' -Value 7 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineGracePeriod' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'ConfigureDeadlineNoAutoRebootForQualityUpdates' -Value 0 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).