How to disable SMBv1 on the SMB server and Client
Windows 8 and 2012:
Set-SmbServerConfiguration -EnableSMB1Protocol $false
sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled
Windows 7, 2008, 2008 R2, Vista:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force
sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi
sc.exe config mrxsmb10 start= disabled
Notes:
Rus Powersehll as Administrator.
You must run these commands at an elevated command prompt.
You must restart the computer after you make these changes.
to gracefully remove SMB v1 in Windows 8.1, 10, 2012 R2, and 2016:
Windows Server: Remove-WindowsFeature FS-SMB1
Windows Client: Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol