Show lock in the user tile menu
Afficher verrouiller dans le menu Fenêtre de l’utilisateur
Explanation
Shows or hides lock from the user tile menu.
If you enable this policy setting, the lock option will be shown in the User Tile menu.
If you disable this policy setting, the lock option will never be shown in the User Tile menu.
If you do not configure this policy setting, users will be able to choose whether they want lock to show through the Power Options Control Panel.
Affiche ou masque le verrouillage dans le menu Fenêtre de l’utilisateur.
Si vous activez ce paramètre de stratégie, l’option de verrouillage est affichée dans le menu Fenêtre de l’utilisateur.
Si vous désactivez ce paramètre de stratégie, l’option de verrouillage n’est jamais affichée dans le menu Fenêtre de l’utilisateur.
Si vous ne configurez pas ce paramètre de stratégie, les utilisateurs peuvent choisir s’ils veulent que l’option de verrouillage s’affiche via Options d’alimentation du Panneau de configuration.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Explorer- Value name
ShowLockOption
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
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: WindowsExplorer/ShowLockOption
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ShowLockOption' -Value 1 -Type DWordDisable
# Disable: WindowsExplorer/ShowLockOption
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ShowLockOption' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsExplorer/ShowLockOption
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Explorer'
Remove-ItemProperty -Path $k -Name 'ShowLockOption' -ErrorAction SilentlyContinue