Tuesday, 19 June 2018

BlockFileSharing.bat

AllowFileSharing.bat
netsh advfirewall firewall set rule name="File and Printer Sharing (SMB-In)" new action=allow   
netsh advfirewall firewall set rule name="File and Printer Sharing (NB-Session-In)" new action=allow

BlockFileSharing.bat
netsh advfirewall firewall set rule name="File and Printer Sharing (SMB-In)" new action=block
netsh advfirewall firewall set rule name="File and Printer Sharing (NB-Session-In)" new action=block