Open in the explorer

Timeout for hung logon sessions during shutdown

Délai d’expiration des sessions bloquées en cours d’arrêt

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Shutdown Options FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Options d’arrêt
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
WinInit.admx
Internal name
WinInit/ShutdownTimeoutHungSessionsDescription

Explanation

This policy setting configures the number of minutes the system waits for the hung logon sessions before proceeding with the system shutdown.

If you enable this policy setting, the system waits for the hung logon sessions for the number of minutes specified.

If you disable or do not configure this policy setting, the default timeout value is 3 minutes for workstations and 15 minutes for servers.

French text from Windows 11 26H2

Ce paramètre de stratégie configure le nombre de minutes pendant lesquelles le système attend les sessions bloquées avant de poursuivre l’arrêt du système.

Si vous activez ce paramètre de stratégie, le système attend les sessions bloquées pendant le nombre de minutes spécifié.

Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, la valeur par défaut du délai d’expiration est de 3 minutes pour les stations de travail et de 15 minutes pour les serveurs.

Registry

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
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: WinInit/ShutdownTimeoutHungSessionsDescription
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Hung session timeout in Minutes
Set-ItemProperty -Path $k -Name 'ShutdownSessionTimeout' -Value 9999 -Type DWord

Disable

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

Revert to "Not configured"

# Revert to "Not configured": WinInit/ShutdownTimeoutHungSessionsDescription
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'ShutdownSessionTimeout' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Hung session timeout in Minutes:Délai d’expiration des sessions bloquées en minutes :ShutdownSessionTimeout_TimeNumeric boxdecimalShutdownSessionTimeoutREG_DWORD
Default (UI): 9999

Availability