Open in the explorer

Specify maximum log file size

Spécifier la taille maximale du fichier journal

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System › Net Logon FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système › Net Logon
Supported on
At least Windows Server 2003 FR: Au minimum Windows Server 2003
ADMX file
Netlogon.admx
Internal name
Netlogon/Netlogon_MaximumLogFileSize

Explanation

This policy setting specifies the maximum size in bytes of the log file netlogon.log in the directory %windir%\debug when logging is enabled.

By default, the maximum size of the log file is 20MB. If you enable this policy setting, the maximum size of the log file is set to the specified size. Once this size is reached the log file is saved to netlogon.bak and netlogon.log is truncated. A reasonable value based on available storage should be specified.

If you disable or do not configure this policy setting, the default behavior occurs as indicated above.

French text from Windows 11 26H2

Ce paramètre de stratégie spécifie la taille maximale en octets du fichier journal netlogon.log dans le répertoire %windir%\debug lorsque la journalisation est activée.

Par défaut, la taille maximale du fichier journal est 20 Mo. Si vous activez ce paramètre de stratégie, la taille maximale du fichier journal est celle spécifiée. Une fois cette taille atteinte, le fichier journal est enregistré sous le nom netlogon.bak et netlogon.log est tronqué. Vous devez spécifier une valeur appropriée en fonction de l’espace de stockage disponible.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, le comportement par défaut indiqué ci-dessus se produit.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Netlogon\Parameters
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

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: Netlogon/Netlogon_MaximumLogFileSize
$k = 'HKLM:\Software\Policies\Microsoft\Netlogon\Parameters'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Bytes
Set-ItemProperty -Path $k -Name 'MaximumLogFileSize' -Value 536936447 -Type DWord  # maximum 4294967295

Disable

# Disable: Netlogon/Netlogon_MaximumLogFileSize
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": Netlogon/Netlogon_MaximumLogFileSize
$k = 'HKLM:\Software\Policies\Microsoft\Netlogon\Parameters'
Remove-ItemProperty -Path $k -Name 'MaximumLogFileSize' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Bytes:Octets :Netlogon_MaximumLogFileSizeLabelNumeric boxdecimalMaximumLogFileSizeREG_DWORD
Required · Max: 4294967295 · Default (UI): 536936447

Availability