Mandate the maximum version of SMB
Mandater la version maximale de SMB
Explanation
This policy controls the maximum version of SMB protocol
Note: This group policy does not prevent use of SMB 1 if that component is still installed and enabled.
Cette stratégie contrôle la version maximale du protocole SMB
Remarque : cette stratégie de groupe n’empêche pas l’utilisation de SMB 1 si ce composant est toujours installé et activé.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\LanmanWorkstation- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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_MaxSmb2Dialect
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Version
# Possible options:
# SMB 3.1.1 = 785
# SMB 3.0.2 = 770
# SMB 3.0.0 = 768
# SMB 2.1.0 = 528
# SMB 2.0.2 = 514
Set-ItemProperty -Path $k -Name 'MaxSmb2Dialect' -Value 785 -Type DWordDisable
# Disable: LanmanWorkstation/Pol_MaxSmb2Dialect
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": LanmanWorkstation/Pol_MaxSmb2Dialect
$k = 'HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation'
Remove-ItemProperty -Path $k -Name 'MaxSmb2Dialect' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Version:Version :MaxSmb2Dialect | Drop-down listenum | MaxSmb2Dialect | REG_DWORD | Required · Default choice (UI): #0
|