Enable or Disable Network Discovery in Windows 10/8/7
Using CMD
To turn off Network Discovery run the following command in an elevated command prompt:
netsh advfirewall firewall set rule group="Network Discovery" new enable=No
netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes