From a powershell or cmd window:

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes