Aan/uit-knop van Startmenu instellen: registerwaarde PowerButtonActionGebruikerHKCU\Software\Policies\Microsoft\Windows\Explorer

Beleids-ID
PowerButtonAction
Bereik
Gebruikersconfiguratie
Ondersteund op
Windows Server 2008 R2 en Windows 7
Bron
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (versie 1.0)
Categorie
Startmenu en Taakbalk

Register

PowerButtonAction

REG_DWORDGebruiker
Waarde bij ingeschakeld
Afhankelijk van de waarde van de optie
Element
Kies een van de volgende acties
Opties
ItemOpgeslagen waarde
Afsluiten2
Slaapstand16
Afmelden1
Vergrendelen512
Opnieuw opstarten4
Andere gebruiker256
Sluimerstand64
Toepassen met .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]

; Opties (gebruik er maar één)
; Afsluiten
"PowerButtonAction"=dword:00000002
; Slaapstand
"PowerButtonAction"=dword:00000010
; Afmelden
"PowerButtonAction"=dword:00000001
; Vergrendelen
"PowerButtonAction"=dword:00000200
; Opnieuw opstarten
"PowerButtonAction"=dword:00000004
; Andere gebruiker
"PowerButtonAction"=dword:00000100
; Sluimerstand
"PowerButtonAction"=dword:00000040
CMD
:: Opties (gebruik er maar één)

:: Afsluiten
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "PowerButtonAction" /t REG_DWORD /d 2 /f
:: Slaapstand
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "PowerButtonAction" /t REG_DWORD /d 16 /f
:: Afmelden
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "PowerButtonAction" /t REG_DWORD /d 1 /f
:: Vergrendelen
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "PowerButtonAction" /t REG_DWORD /d 512 /f
:: Opnieuw opstarten
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "PowerButtonAction" /t REG_DWORD /d 4 /f
:: Andere gebruiker
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "PowerButtonAction" /t REG_DWORD /d 256 /f
:: Sluimerstand
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "PowerButtonAction" /t REG_DWORD /d 64 /f
PowerShell
# Algemeen: sleutel maken
New-Item -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Force | Out-Null

# Opties (gebruik er maar één)
# Afsluiten
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Name 'PowerButtonAction' -PropertyType DWord -Value 2 -Force | Out-Null
# Slaapstand
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Name 'PowerButtonAction' -PropertyType DWord -Value 16 -Force | Out-Null
# Afmelden
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Name 'PowerButtonAction' -PropertyType DWord -Value 1 -Force | Out-Null
# Vergrendelen
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Name 'PowerButtonAction' -PropertyType DWord -Value 512 -Force | Out-Null
# Opnieuw opstarten
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Name 'PowerButtonAction' -PropertyType DWord -Value 4 -Force | Out-Null
# Andere gebruiker
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Name 'PowerButtonAction' -PropertyType DWord -Value 256 -Force | Out-Null
# Sluimerstand
New-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' -Name 'PowerButtonAction' -PropertyType DWord -Value 64 -Force | Out-Null