Open in the explorer

Remove logon hours expiration warnings

Supprimer les avertissements d’expiration des horaires d’accès

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Windows Components › Windows Logon Options FR: Configuration utilisateur › Stratégies › Modèles d'administration › Composants Windows › Options d’ouverture de session Windows
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
WinLogon.admx
Internal name
WinLogon/LogonHoursNotificationPolicyDescription

Explanation

This policy controls whether the logged on user should be notified when his logon hours are about to expire. By default, a user is notified before logon hours expire, if actions have been set to occur when the logon hours expire.

If you enable this setting, warnings are not displayed to the user before the logon hours expire.

If you disable or do not configure this setting, users receive warnings before the logon hours expire, if actions have been set to occur when the logon hours expire.

Note: If you configure this setting, you might want to examine and appropriately configure the “Set action to take when logon hours expire” setting. If “Set action to take when logon hours expire” is disabled or not configured, the “Remove logon hours expiration warnings” setting will have no effect, and users receive no warnings about logon hour expiration

French text from Windows 11 26H2

Cette stratégie indique si l’utilisateur connecté doit être averti avant l’expiration de ses horaires d’accès. Par défaut, l’utilisateur est averti avant l’expiration de ses horaires d’accès, si des actions ont été définies pour se produire au moment de l’expiration de ses horaires d’accès.

Si vous activez ce paramètre, l’utilisateur ne recevra pas d’avertissement avant l’expiration de ses horaires d’accès.

Si vous désactivez ce paramètre ou si vous ne le configurez pas, l’utilisateur recevra des avertissements avant l’expiration de ses horaires d’accès, si des actions ont été définies pour se produire au moment de l’expiration de ses horaires d’accès.

Remarque : si vous configurez ce paramètre, vous pouvez configurer de manière appropriée le paramètre « Définir l’action à entreprendre à l’expiration des horaires d’accès ». Si le paramètre « Définir l’action à entreprendre à l’expiration des horaires d’accès » est désactivé ou non configuré, le paramètre « Supprimer les avertissements d’expiration des horaires d’accès » n’aura aucun effet et les utilisateurs ne recevront pas d’avertissement avant l’expiration de leurs horaires d’accès.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
Value name
DontDisplayLogonHoursWarnings
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 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: WinLogon/LogonHoursNotificationPolicyDescription
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DontDisplayLogonHoursWarnings' -Value 1 -Type DWord

Disable

# Disable: WinLogon/LogonHoursNotificationPolicyDescription
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DontDisplayLogonHoursWarnings' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WinLogon/LogonHoursNotificationPolicyDescription
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'DontDisplayLogonHoursWarnings' -ErrorAction SilentlyContinue

Availability