Contrôler le comportement du journal des événements lorsque le fichier journal atteint sa taille maximale. : valeur de Registre Retention (System)OrdinateurHKLM\Software\Policies\Microsoft\Windows\EventLog\System

ID de stratégie
Channel_Log_Retention_4
Étendue
Configuration ordinateur
Pris en charge sur
Au minimum Windows Vista
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Catégorie
Composants Windows › Service Journal des événements › Système

Registre

Retention

REG_SZOrdinateur
Valeur si activée
1
Valeur si désactivée
0
Appliquer avec .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\System]

; Options (en utiliser une seule)
; Activé
"Retention"="1"
; Désactivé
"Retention"="0"
CMD
:: Options (en utiliser une seule)

:: Activé
reg add "HKLM\Software\Policies\Microsoft\Windows\EventLog\System" /v "Retention" /t REG_SZ /d 1 /f
:: Désactivé
reg add "HKLM\Software\Policies\Microsoft\Windows\EventLog\System" /v "Retention" /t REG_SZ /d 0 /f
PowerShell
# Commun : créer la clé
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\System' -Force | Out-Null

# Options (en utiliser une seule)
# Activé
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\System' -Name 'Retention' -PropertyType String -Value '1' -Force | Out-Null
# Désactivé
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\System' -Name 'Retention' -PropertyType String -Value '0' -Force | Out-Null