Change Start Menu power button
Changer le bouton d’alimentation du menu Démarrer
Explanation
Set the default action of the power button on the Start menu.
If you enable this setting, the Start Menu will set the power button to the chosen action, and not let the user change this action.
If you set the button to either Sleep or Hibernate, and that state is not supported on a computer, then the button will fall back to Shut Down.
If you disable or do not configure this setting, the Start Menu power button will be set to Shut Down by default, and the user can change this setting to another action.
Détermine l’action par défaut du bouton d’alimentation dans le menu Démarrer.
Si vous activez ce paramètre, le menu Démarrer applique au bouton d’alimentation l’action choisie et ne permet pas à l’utilisateur d’en changer.
Si vous définissez l’action Veille ou Veille prolongée et que cet état n’est pas pris en charge sur l’ordinateur, l’action Arrêter est appliquée à la place.
Si vous désactivez ce paramètre ou si vous ne le configurez pas, le bouton d’alimentation du menu Démarrer adopte par défaut l’action Arrêter et l’utilisateur a la possibilité de choisir une autre action, s’il le souhaite.
Registry
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer- 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: StartMenu/PowerButtonAction
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Choose one of the following actions
# Possible options:
# Shut Down = 2
# Sleep = 16
# Log off = 1
# Lock = 512
# Restart = 4
# Switch User = 256
# Hibernate = 64
Set-ItemProperty -Path $k -Name 'PowerButtonAction' -Value 2 -Type DWordDisable
# Disable: StartMenu/PowerButtonAction
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": StartMenu/PowerButtonAction
$k = 'HKCU:\Software\Policies\Microsoft\Windows\Explorer'
Remove-ItemProperty -Path $k -Name 'PowerButtonAction' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Choose one of the following actionsChoisir l’une des actions suivantesPowerButtonActionDropdown | Drop-down listenum | PowerButtonAction | REG_DWORD | Required · Default choice (UI): #0
|