How to disable SMBv1, SMBv2 on Windows 10/8 to prevent Wannacry ransomware

With Server Message Block (SMB) protocol, you are able to easily share files, folder, printers, and communicate this information between computers in a networked environment. However, the recent cyber attack of the WannaCrypt or WannaCry ransomware uses the ETERNALBLUE tool to exploit the vulnerability in the SMB service to spread and propagate. If you want to prevent virus from from spreading for security reason or don’t need the service or , try the methods to turn off SMB on Surface Pro tablet or Windows 10/8 machine.

How to Disable SMBv1, SMBv2 on Windows 10/8 to defend yourself against WannaCrypt ransomware
By PowerShell
* In Windows 8.1/8, type powershell from Start screen or the the Search flyout of Charms bar. In Windows 10, type powershell in Cortana search box or tart menu.
* Right click on the Windows PowerShell from result, and select “Run as administrator” from content menu.
* Type the command below carefully, or copy and paste it:

Set - ItemProperty -Path  
HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters” SMB1 
- Value 0 –Force

Then press Enter to execute it for disable SMB version 1. SMB v1 technology is almost 30 years old and outdated completely, so it doesn’t take effect with your current features.
* If you also want to disable SMB version 2 & version 3 temporarily, run the commmand below:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 –Force

To re-enable SMB2 & SMB3 in the future, try another command:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 –Force

You can also do that through Control Panel
* Type Control Panel in Start menu on Windows 10, or Charms bar’s search box on Windows 8, then open the top one from result.
* Go to Programs & Features, and click on “Turn Windows features on or off” in the left side.
* Locate the “SMB 1.0/CIFS File Sharing Support” from the list and uncheck its checkbox next to it, then click OK button to remove the feature. Finally restart your system to apply that.


Leave a Reply