Lock Enhanced Storage when the computer is locked
Verrouiller le stockage étendu lorsque l’ordinateur est verrouillé
Explanation
This policy setting locks Enhanced Storage devices when the computer is locked.
This policy setting is supported in Windows Server SKUs only.
If you enable this policy setting, the Enhanced Storage device remains locked when the computer is locked.
If you disable or do not configure this policy setting, the Enhanced Storage device state is not changed when the computer is locked.
Ce paramètre de stratégie verrouille les dispositifs de stockage étendu lorsque l’ordinateur est verrouillé.
Il est uniquement pris en charge par les références Windows Server.
Si vous activez ce paramètre de stratégie, le dispositif de stockage étendu reste verrouillé lorsque l’ordinateur l’est également.
Si vous désactivez ce paramètre ou ne le configurez pas, l’état du dispositif de stockage étendu reste inchangé lorsque l’ordinateur est verrouillé.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EnhancedStorageDevices- Value name
LockDeviceOnMachineLock
| 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: EnhancedStorage/LockDeviceOnMachineLock
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EnhancedStorageDevices'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'LockDeviceOnMachineLock' -Value 1 -Type DWordDisable
# Disable: EnhancedStorage/LockDeviceOnMachineLock
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EnhancedStorageDevices'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'LockDeviceOnMachineLock' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": EnhancedStorage/LockDeviceOnMachineLock
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EnhancedStorageDevices'
Remove-ItemProperty -Path $k -Name 'LockDeviceOnMachineLock' -ErrorAction SilentlyContinue