Thursday, June 8, 2017

Enable and Disable SMBv1, SMBv2, and SMBv3 in Windows and Windows Server

(draft)

How to remove SMB v1 in Windows 8.1, Windows 10, Windows 2012 R2, and Windows Server 2016


• Windows Server PowerShell Command:
Remove-WindowsFeature FS-SMB1
 
• Windows Client PowerShell Command:
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol

How to enable or disable SMB protocols on the SMB server

Windows 8 and Windows Server 2012

• To view the current state of the SMB server protocol configuration, run the following command:
Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol

• To disable SMBv1 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB1Protocol $false

• To disable SMBv2 and SMBv3 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB2Protocol $false

• To enable SMBv1 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB1Protocol $true

• To enable SMBv2 and SMBv3 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB2Protocol $true

Notes:
You do not have to restart the computer after you run the Set-SMBServerConfiguration.
When you enable or disable SMBv2 in Windows 8 or in Windows Server 2012, SMBv3 is also enabled or disabled.

 

Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008

• To disable SMBv1 on the SMB server, run the following command:Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force

• To disable SMBv2 and SMBv3 on the SMB server, run the following cmdlet:Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 -Force

• To enable SMBv1 on the SMB server, run the following command:Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 1 -Force

• To enable SMBv2 and SMBv3 on the SMB server, run the following command:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 -Force


Note: You must restart the computer after you make these changes.

How to enable or disable SMB protocols on the SMB client








No comments:

Post a Comment