Open in the explorer

Do not turn off system power after a Windows system shutdown has occurred.

Ne pas éteindre l’alimentation de l’ordinateur après l’arrêt du système par Windows.

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › System FR: Configuration ordinateur › Stratégies › Modèles d'administration › Système
Supported on
At least Windows Server 2003 operating systems or Windows XP Professional with SP1 FR: Au minimum Windows Server 2003 ou Windows XP Professionnel avec SP1
ADMX file
Power.admx
Internal name
Power/Dont_PowerOff_AfterShutdown

Explanation

This policy setting allows you to configure whether power is automatically turned off when Windows shutdown completes. This setting does not affect Windows shutdown behavior when shutdown is manually selected using the Start menu or Task Manager user interfaces. Applications such as UPS software may rely on Windows shutdown behavior.

This setting is only applicable when Windows shutdown is initiated by software programs invoking the Windows programming interfaces ExitWindowsEx() or InitiateSystemShutdown().

If you enable this policy setting, the computer system safely shuts down and remains in a powered state, ready for power to be safely removed.

If you disable or do not configure this policy setting, the computer system safely shuts down to a fully powered-off state.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de spécifier si l’alimentation est automatiquement éteinte lorsque Windows arrête l’ordinateur. Ce paramètre n’affecte pas le comportement de Windows lorsque l’arrêt de l’ordinateur est sélectionné manuellement via le menu Démarrer ou le Gestionnaire des tâches. Certaines applications (le logiciel de gestion d’un onduleur, par exemple) peuvent dépendre du comportement de Windows lors de l’arrêt.

Ce paramètre est appliqué uniquement si l’arrêt de Windows est initié par des logiciels invoquant les interfaces de programmation Windows ExitWindowsEx() ou InitiateSystemShutdown().

Si vous activez ce paramètre de stratégie, l’ordinateur est normalement arrêté et reste alimenté ; le retrait de l’alimentation peut se faire en toute sécurité.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, l’ordinateur s’arrête normalement et reste éteint.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT
Value name
DontPowerOffAfterShutdown
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

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: Power/Dont_PowerOff_AfterShutdown
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'DontPowerOffAfterShutdown' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: Power/Dont_PowerOff_AfterShutdown
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'DontPowerOffAfterShutdown' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": Power/Dont_PowerOff_AfterShutdown
$k = 'HKLM:\Software\Policies\Microsoft\Windows NT'
Remove-ItemProperty -Path $k -Name 'DontPowerOffAfterShutdown' -ErrorAction SilentlyContinue

Availability