Configurer les fenêtres de maintenance pour les mises à jour automatiques
Vérifié avec Windows 11 25H2 — mis à jour le 15 septembre 2026 Pris en charge sur : Au moins Windows 11 version 24H2
Livrée par une mise à jour Windows : absente du paquet ADMX officiel (Administrative Templates (.admx) for Windows 11 Oct 2025 Update), présente au plus tard dans KB5124008 (build 26200.9445).
Chemin dans la console GPO
Configuration ordinateur\Modèles d'administration\Composants Windows\Windows Update\Gérer l’expérience utilisateur final Registre
Software\Policies\Microsoft\Windows\WindowsUpdate - Nom de valeur :
-
MaintenanceWindowEnabledREG_DWORD - Activé :
1- Désactivé :
0
Description
Activez cette stratégie pour spécifier des fenêtres de maintenance reproductibles, afin que l’appareil effectue des actions de mise à jour spécifiées. Lorsque cette stratégie est activée, Windows Update effectue uniquement l’action de mise à jour spécifiée pendant la fenêtre de maintenance configurée. Les actions de mise à jour spécifiées en dehors de la fenêtre de maintenance sont différées jusqu’au début de la fenêtre de maintenance suivante. • Actions de mise à jour : sélectionnez les actions de mise à jour uniquement autorisées pendant la fenêtre de maintenance. Si une action de mise à jour n’est pas sélectionnée, cette action peut se produire en dehors de la fenêtre de maintenance. - Télécharger, installer et redémarrer : terminez le cycle de mise à jour, y compris le téléchargement, l’installation et le redémarrage du système - Installer et redémarrer : installer les mises à jour déjà téléchargées, puis redémarrer l’appareil - Redémarrer uniquement : effectuer uniquement un redémarrage du système pour les mises à jour en attente • Configuration de planification de base : - Date de début : spécifier la date initiale de début de la première fenêtre de maintenance (format : aaaa-mm-jj, par exemple : 2025-10-30) * Le champ Date de début prend effet uniquement si la planification périodique est définie sur « Aucune » - Heure de début : définir l’heure à laquelle la fenêtre de maintenance démarre (format : hh:mm, par exemple : 23:30 pour 23 h 30) - Durée : définir la durée pendant laquelle chaque fenêtre de maintenance dure, en heures (par exemple : 2 pour une fenêtre de 2 heures) • Options de planification périodique : - Aucune répétition : fenêtre de maintenance unique à la date de début spécifiée uniquement - Quotidienne : la fenêtre de maintenance est répétée tous les jours - Hebdomadaire : la fenêtre de maintenance est répétée toutes les semaines lors des jours sélectionnés - Mensuelle : la fenêtre de maintenance est répétée tous les mois lors d’un jour spécifique • Paramètres de planification hebdomadaire (lorsque Hebdomadaire est sélectionnée) : - Sélection du jour de la semaine : choisir les jours de la semaine où la fenêtre de maintenance se produit : * Dimanche à samedi : cocher les cases pour sélectionner le ou les jours spécifiques de la semaine pour la fenêtre de maintenance • Paramètres de planification mensuelle (lorsque Mensuelle est sélectionnée) : - Type de planification mensuelle : * À une date spécifique : la fenêtre de maintenance se produit un jour spécifique du mois (par exemple : le 15e jour de chaque mois) * Basée sur une semaine : la fenêtre de maintenance se produit lors d’un jour de la semaine spécifique au cours du mois (par exemple : 2e mardi de chaque mois) * Dernier jour du mois : la fenêtre de maintenance se produit le dernier jour du mois - Jour du mois : lors de l’utilisation de la planification basée sur les dates, spécifiez le jour du mois (1 à 28) - Occurrence durant le mois : lors de l’utilisation de la planification basée sur une semaine, sélectionnez la semaine du mois (première, deuxième, troisième, quatrième ou dernière) - Jour de la semaine : lorsque vous utilisez la planification basée sur la semaine, sélectionnez le jour de la semaine (du dimanche au samedi) Exemples de configurations mensuelles : - À une date spécifique : « 3e jour de chaque mois » = Jour du mois : 3 - Basée sur une semaine : « Deuxième mardi de chaque mois » = Occurrence : deuxième, Jour de la semaine : mardi - Basée sur une semaine : « Dernier vendredi de chaque mois » = Occurrence : dernière, Jour de la semaine : vendredi - Dernier jour du mois : « Dernier jour de chaque mois » Suite à une fenêtre de maintenance qui ne se répète pas, la fenêtre de maintenance suivante doit être planifiée dans 3 mois. Si la date de début d’une fenêtre de maintenance non récurrente remonte à plus de 3 mois, cette stratégie est ignorée et les mises à jour sont planifiées en fonction des paramètres par défaut. Si vous désactivez ou ne configurez pas cette stratégie, Windows Update poursuit son comportement de planification par défaut.
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: Configurer les fenêtres de maintenance pour les mises à jour automatiques
; State: Enabled
; Supported on: Au moins Windows 11 version 24H2
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate]
"MaintenanceWindowEnabled"=dword:00000001
"MaintenanceWindowUpdateActions"=dword:00000002
"MaintenanceWindowStartDate"=""
"MaintenanceWindowStartTime"=""
"MaintenanceWindowDurationHours"=dword:00000002
"MaintenanceWindowRepeatScheduleOption"=dword:00000002
"MaintenanceWindowWeeklySunday"=dword:00000000
"MaintenanceWindowWeeklyMonday"=dword:00000000
"MaintenanceWindowWeeklyTuesday"=dword:00000000
"MaintenanceWindowWeeklyWednesday"=dword:00000000
"MaintenanceWindowWeeklyThursday"=dword:00000000
"MaintenanceWindowWeeklyFriday"=dword:00000000
"MaintenanceWindowWeeklySaturday"=dword:00000000
"MaintenanceWindowMonthlySchedule"=dword:00000002
"MaintenanceWindowMonthlyMonthBasedDayOfMonth"=dword:00000001
"MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth"=dword:00000002
"MaintenanceWindowMonthlyWeekBasedDayOfTheWeek"=dword:00000002 Autres formats (PowerShell, Intune, SCCM)
PowerShell
# Exported from gporais.com
# Policy: Configurer les fenêtres de maintenance pour les mises à jour automatiques
# State: Enabled
# Supported on: Au moins Windows 11 version 24H2
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'MaintenanceWindowEnabled' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowUpdateActions' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowStartDate' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaintenanceWindowStartTime' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaintenanceWindowDurationHours' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowRepeatScheduleOption' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklySunday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyMonday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyTuesday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyWednesday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyThursday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyFriday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklySaturday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlySchedule' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyMonthBasedDayOfMonth' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -Value 2 -Type DWord Intune XML
Aucune correspondance directe Policy CSP / OMA-URI pour cette stratégie. Utilisez l'onglet Intune Remediation, ou importez l'ADMX dans Intune. Intune Remediation
# === Detection script ===
# Exported from gporais.com
# Policy: Configurer les fenêtres de maintenance pour les mises à jour automatiques
# State: Enabled
# Supported on: Au moins Windows 11 version 24H2
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 'MaintenanceWindowEnabled' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowUpdateActions' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowStartDate' -Expected '' -Kind String)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowStartTime' -Expected '' -Kind String)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowDurationHours' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowRepeatScheduleOption' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySunday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyMonday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyTuesday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyWednesday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyThursday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyFriday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySaturday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlySchedule' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyMonthBasedDayOfMonth' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -Expected 2 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Configurer les fenêtres de maintenance pour les mises à jour automatiques
# State: Enabled
# Supported on: Au moins Windows 11 version 24H2
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'MaintenanceWindowEnabled' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowUpdateActions' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowStartDate' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaintenanceWindowStartTime' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaintenanceWindowDurationHours' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowRepeatScheduleOption' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklySunday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyMonday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyTuesday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyWednesday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyThursday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyFriday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklySaturday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlySchedule' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyMonthBasedDayOfMonth' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -Value 2 -Type DWord Scripts SCCM
# Exported from gporais.com
# Policy: Configurer les fenêtres de maintenance pour les mises à jour automatiques
# State: Enabled
# Supported on: Au moins Windows 11 version 24H2
# 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: Configurer les fenêtres de maintenance pour les mises à jour automatiques
# State: Enabled
# Supported on: Au moins Windows 11 version 24H2
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 'MaintenanceWindowEnabled' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowUpdateActions' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowStartDate' -Expected '' -Kind String)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowStartTime' -Expected '' -Kind String)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowDurationHours' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowRepeatScheduleOption' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySunday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyMonday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyTuesday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyWednesday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyThursday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklyFriday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowWeeklySaturday' -Expected 0 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlySchedule' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyMonthBasedDayOfMonth' -Expected 1 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -Expected 2 -Kind DWord)
(Test-RegistryValue -Path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -Expected 2 -Kind DWord)
)
if ($checks -notcontains $false) {
Write-Output 'Compliant'
exit 0
}
Write-Output 'Non-compliant'
exit 1
# === Remediation script ===
# Exported from gporais.com
# Policy: Configurer les fenêtres de maintenance pour les mises à jour automatiques
# State: Enabled
# Supported on: Au moins Windows 11 version 24H2
$path = 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'MaintenanceWindowEnabled' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowUpdateActions' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowStartDate' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaintenanceWindowStartTime' -Value '' -Type String
Set-ItemProperty -Path $path -Name 'MaintenanceWindowDurationHours' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowRepeatScheduleOption' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklySunday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyMonday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyTuesday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyWednesday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyThursday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklyFriday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowWeeklySaturday' -Value 0 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlySchedule' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyMonthBasedDayOfMonth' -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyWeekBasedOccurrenceInMonth' -Value 2 -Type DWord
Set-ItemProperty -Path $path -Name 'MaintenanceWindowMonthlyWeekBasedDayOfTheWeek' -Value 2 -Type DWord Vous construisez une collection multi-paramètres ? Ajoutez ce paramètre et générez des exports combinés (.reg, PowerShell, GPO).