copied from
http://www.solutionit.com.au/default.asp?go=tips&TipID=21
which came from
http://streetjesus.blogspot.com/2005/07/tech-command-line-manipulation-of.html
which is inaccessible
Add Ports to the Exception List:
netsh firewall add portopening TCP 1234 Port/ApplicationLabel
netsh firewall add portopening UDP 5678 Port/ApplicationLabel
Disable the Firewall:
netsh firewall set opmode disable
Enable the Firewall:
netsh firewall set opmode enable
Enable the Firewall and DO NOT Allow Port \ Program Exceptions:
netsh firewall set opmode enable disable
Enable Firewall and Allow Port \ Program Exceptions:
netsh firewall set opmode enable enable
Enable Firewall on Local Area Connection:
netsh firewall set opmode mode=ENABLE interface="local area connection"
Disable Firewall on Local Area Connection:
netsh firewall set opmode mode=DISABLE interface="local area connection"
Enable the Firewall on Wireless Network Connection:
netsh firewall set opmode mode=ENABLE interface="wireless network connection"
Disable Firewall on Wireless Network Connection:
netsh firewall set opmode mode=DISABLE interface="wireless network connection"