Windows firewall – block all incoming connections enable/disable – CREATE SCRIPT

firewallscriptwindows 7windows firewall

Is it possible to create script which enable/disable the first checkbox of windows 7 firewall settings (Block all incoming connections....)?

enter image description here

Best Answer

enable:

netsh advfirewall set domainprofile firewallpolicy blockinboundalways,allowoutbound

disable:

netsh advfirewall set domainprofile firewallpolicy blockinbound,allowoutbound
Related Question