4

I have some rules that I want to be toggled on and off. In Windows 10, how do I enable/disable these rules using the cmd prompt?

1 Answer 1

8

Run this in an elevated CMD (replace name with the name of your rule)

netsh advfirewall firewall set rule name="TestRule" new enable=yes

To disable the rule again run

netsh advfirewall firewall set rule name="TestRule" new enable=no

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .