One of the advices to defend itself against WannaCry and other malware that could exploit the same vulnerabilities is to disable SMBv1, the old version of the Server Message Block Version 1 protocol used to share files from Windows machines.
How to disable SMBv1 on Windows Server 2012 R2 and Windows Server 2016
I WANT SERVER MANAGER
- Open the Server Manger, select Management at the top right
- Open Remove roles and features
- Select the server and navigate to the Features tab
- Deselect SMB 1.0 / CIFS File Sharing Support
- Press forward and restart the server.
- Open PowerShell (you can also find it with Start -> Run -> powershell )
- TypeRemove-WindowsFeature FS-SMB1and press Enter.
BY PROGRAMS AND FUNCTIONALITY
Open Programs and Features by typing in the Start Control Panel menu
In the left links, press Activate or deactivate Windows features and press OK on the User Account Control window
Look for and remove SMB 1.0 / CIFS file sharing support , press OK and restart the system.
- Open PowerShell with Administrator Rights by typing powershell in the Start menu -> right click -> Run as Administrator
- TypeDisable-WindowsOptionalFeature -Online -FeatureName smb1protocoland press Enter
How to disable SMBv1 on Windows 7
- Open Command Prompts with Administrator Rights (Start -> Type cmd -> Right Click -> Run as Administrator
- Type the following commands and press Enter: sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled