Require Encryption
Exiger un chiffrement
Explanation
This policy controls whether the SMB client will require encryption.
If you enable this policy setting, the SMB client will require the SMB server to support encryption and encrypt the data.
If you disable or do not configure this policy setting, the SMB client will not require encryption. However, SMB encryption may still be required; see notes below.
Note: This policy is combined with per-share, per-server, and per mapped drive connection properties, through which SMB encryption may be required. The SMB server must support and enable SMB encryption. For example, should this policy be disabled (or not configured), the SMB client may still perform encryption if an SMB server share has required encryption.
Important: SMB encryption requires SMB 3.0 or later
Cette stratégie contrôle si le client SMB nécessite un chiffrement.
Si vous activez ce paramètre de stratégie, le client SMB exige que le serveur SMB prenne en charge le chiffrement et chiffre les données.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, le client SMB ne nécessite pas de chiffrement. Toutefois, le chiffrement SMB peut toujours être requis ; consultez les notes ci-dessous.
Remarque : cette stratégie est combinée avec les propriétés de connexion par partage, par serveur et par lecteur mappé, par le biais desquels le chiffrement SMB peut être requis. Le serveur SMB doit assurer la prise en charge et l’activation du chiffrement SMB. Par exemple, si cette stratégie est désactivée (ou n’est pas configurée), le client SMB peut toujours effectuer le chiffrement si un partage de serveur SMB nécessite un chiffrement.
Important : le chiffrement SMB nécessite SMB 3.0 ou version ultérieure
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LanmanWorkstation- Value name
RequireEncryption
| 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: LanmanWorkstation/Pol_RequireEncryption
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RequireEncryption' -Value 1 -Type DWordDisable
# Disable: LanmanWorkstation/Pol_RequireEncryption
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RequireEncryption' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": LanmanWorkstation/Pol_RequireEncryption
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
Remove-ItemProperty -Path $k -Name 'RequireEncryption' -ErrorAction SilentlyContinue