Remove Lock Computer
Désactiver le verrouillage de l’ordinateur
Explanation
This policy setting prevents users from locking the system.
While locked, the desktop is hidden and the system cannot be used. Only the user who locked the system or the system administrator can unlock it.
If you enable this policy setting, users cannot lock the computer from the keyboard using Ctrl+Alt+Del.
If you disable or do not configure this policy setting, users will be able to lock the computer from the keyboard using Ctrl+Alt+Del.
Tip:To lock a computer without configuring a setting, press Ctrl+Alt+Delete, and then click Lock this computer.
Ce paramètre de stratégie empêche les utilisateurs de verrouiller le système.
Lorsqu’il est verrouillé, le Bureau est caché et le système ne peut pas être utilisé. Le système ne peut être déverrouillé que par l’utilisateur qui l’a verrouillé ou par l’administrateur système.
Si vous activez ce paramètre de stratégie, les utilisateurs ne peuvent pas verrouiller l’ordinateur à partir du clavier via les touches Ctrl+Alt+Suppr.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, les utilisateurs peuvent verrouiller l’ordinateur à partir du clavier via les touches Ctrl+Alt+Suppr.
Conseil : pour verrouiller un ordinateur sans configurer de paramètre, appuyez sur les touches Ctrl+Alt+Suppr, puis cliquez sur « Verrouiller cet ordinateur ».
Registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System- Value name
DisableLockWorkstation
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX |
| Disabled | not 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: CtrlAltDel/DisableLockComputer
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
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 'DisableLockWorkstation' -Value 1 -Type DWord # assumed value (not defined in the ADMX)Disable
# Disable: CtrlAltDel/DisableLockComputer
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
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 'DisableLockWorkstation' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": CtrlAltDel/DisableLockComputer
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'DisableLockWorkstation' -ErrorAction SilentlyContinue