Timeout for hung logon sessions during shutdown
Délai d’expiration des sessions bloquées en cours d’arrêt
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.
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 DWordDisable
# 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 SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Hung session timeout in Minutes:Délai d’expiration des sessions bloquées en minutes :ShutdownSessionTimeout_Time | Numeric boxdecimal | ShutdownSessionTimeout | REG_DWORD | Default (UI): 9999 |