
Set-ItemProperty -Path “HKLM:SYSTEMCurrentControlSetServicesLanmanServerParameters” SMB2 -Type DWORD -Value 0 -Force Set-ItemProperty -Path “HKLM:SYSTEMCurrentControlSetServicesLanmanServerParameters” SMB1 -Type DWORD -Value 0 -Force Windows PowerShell 2.0 or a later version of PowerShell To enable or disable SMB protocols on an SMB Server that is running Windows 7, Windows Server 2008 R2, Windows Vista, or Windows Server 2008, use Windows PowerShell or Registry Editor. Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008 Set-SmbServerConfiguration -EnableSMB2Protocol $true To enable SMBv2 and SMBv3 on the SMB server, run the following cmdlet:.Set-SmbServerConfiguration -EnableSMB1Protocol $true To enable SMBv1 on the SMB server, run the following cmdlet:.Set-SmbServerConfiguration -EnableSMB2Protocol $false To disable SMBv2 and SMBv3 on the SMB server, run the following cmdlet:.Set-SmbServerConfiguration -EnableSMB1Protocol $false To disable SMBv1 on the SMB server, run the following cmdlet:.Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol To obtain the current state of the SMB server protocol configuration, run the following cmdlet:.You do not have to restart the computer after you run the Set-SMBServerConfiguration cmdlet. This behavior occurs because these protocols share the same stack. Notes When you enable or disable SMBv2 in Windows 8 or in Windows Server 2012, SMBv3 is also enabled or disabled. The cmdlet enables you to enable or disable the SMBv1, SMBv2, and SMBv3 protocols on the server component. Windows 8 and Windows Server 2012 introduce the new Set-SMBServerConfiguration Windows PowerShell cmdlet. How to enable or disable SMB protocols on the SMB server Here are the instructions from Microsoft: Disable SMBv2 or SMBv3 only as a temporary troubleshooting measure. Warning: We do not recommend that you disable SMBv2 or SMBv3. One of the methods of defense against Wanna Cry – suggested by many IT professionals – is the disabling of Server Message Block (SMB)v1 in Windows and Windows Server. As part of our ongoing efforts to warn the public about the Wanna Cry ransomware plague that is ravaging computer systems across the globe, the ✅ Boston HelpDesk - Managed IT Services Provider in Boston team is putting together educational articles such as this one to accurately describe ways you can fortify your business IT against the onslaught of pain being wielded by these criminals.
