Open in the explorer

Turn on logging

Activer la journalisation

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Event Log Service › Setup FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Service Journal des événements › Installation
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
EventLog.admx
Internal name
EventLog/Channel_LogEnabled

Explanation

This policy setting turns on logging.

If you enable or do not configure this policy setting, then events can be written to this log.

If the policy setting is disabled, then no new events can be logged. Events can always be read from the log, regardless of this policy setting.

French text from Windows 11 26H2

Ce paramètre de stratégie active la journalisation.

Si vous activez ce paramètre de stratégie ou ne le configurez pas, les événements peuvent être écrits dans ce journal.

Si vous désactivez ce paramètre de stratégie, aucun nouvel événement ne peut être enregistré. Les événements peuvent toujours être lus depuis le journal, quelle que soit la valeur de ce paramètre de stratégie.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Setup
Value name
Enabled
StateValue written
EnabledREG_SZ = 1
DisabledREG_SZ = 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: EventLog/Channel_LogEnabled
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Setup'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value '1' -Type String

Disable

# Disable: EventLog/Channel_LogEnabled
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Setup'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Enabled' -Value '0' -Type String

Revert to "Not configured"

# Revert to "Not configured": EventLog/Channel_LogEnabled
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Setup'
Remove-ItemProperty -Path $k -Name 'Enabled' -ErrorAction SilentlyContinue

Availability