Force turn on file and printer sharing
My issue finally solved after several hours, without requiring to reinstall OS or go back to a previous restore point.
The sequence of commands which did it are given below. I ran them in Windows PowerShell (right click->Run as administrator)
-
Enable SMBv1 on the SMB server:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 1 -Force
-
Enable SMBv2 and SMBv3 on the SMB server:
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 -Force
Restart computer
-
Enable SMBv1 on the SMB client:
a) sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
b) sc.exe config mrxsmb10 start= auto
-
Enable SMBv2 and SMBv3 on the SMB client:
a) sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
b) sc.exe config mrxsmb20 start= auto
Restart computer
All the above commands are given in the Microsoft KB 2696547 article: https://support.microsoft.com/en-ie/help/2696547/how-to-enable-and-disable-smbv1-smbv2-and-smbv3-in-windows-and-windows-server. I had tried these commands earlier too, but missed to run the commands 4 and 5 above for the SMB client. Now after running all the commands, the issue is resolved!
Hope someone finds it helpful, and saves a few hours of time and endless frustration.
Sometimes the issue is because of a service that is stopped or disabled. This is suggested by the fact that the setting enables and immediately disables, as you mentioned. Be sure to have these services enabled (the top 5 should be set to automatic) and running:
Workstation
Server
HomeGroup Provider
HomeGroup Listener
Routing and Remote Access
Remote Procedure Call
Function Discovery Resource Publication
Function Discovery Provider Host