If you need to make firewall settings repeatedly on a single computer as conditions change or, perhaps, on a fleet of computers you’ll find working with Windows Firewall (the Control Panel application) or Windows Firewall With Advanced Security to be a bit cumbersome. The Netsh command, using its Firewall or Advfirewall context, provides an alternative way to view or modify all manner of Windows Firewall settings. For example, you can enable Windows Firewall with this command:
Code:
netsh firewall set opmode enable
The Netsh Firewall context can be considered the basic context, where you can find current firewall settings at a high level. It’s roughly comparable to the Windows Firewall application in Control Panel. From the command prompt, you can see the basic configuration by typing:
Code:
netsh firewall show config
Bookmarks