locked
How to pass two rule names in netsh firewall set rule command RRS feed

  • Question

  • Hi All, how can I use set rule to perform an action on two rules i.e. how can I disable two firewall rules with just one command, I want to pass both rule names in Name parameter in the command, 

    my requirement is to run:

    netsh advfirewall firewall set rule name="Rule1 Rule2" new enable=yes

    please suggest

    Wednesday, August 27, 2014 11:54 PM

Answers

  • Hi,

    The parameter of name can be only one name or all.

    If name=all, then all rules that match the other criteria listed before the new keyword are modified.

    Therefore, we can use other criteria to match multiple rules.

    For detailed inforamtion, please refer to the link below,

    http://technet.microsoft.com/en-us/library/dd734783(v=WS.10).aspx#BKMK_3_set

    Best Regards.



    Steven Lee

    TechNet Community Support

    • Marked as answer by AnupamV Thursday, August 28, 2014 11:56 PM
    Thursday, August 28, 2014 9:17 AM

All replies

  • Hi,

    The parameter of name can be only one name or all.

    If name=all, then all rules that match the other criteria listed before the new keyword are modified.

    Therefore, we can use other criteria to match multiple rules.

    For detailed inforamtion, please refer to the link below,

    http://technet.microsoft.com/en-us/library/dd734783(v=WS.10).aspx#BKMK_3_set

    Best Regards.



    Steven Lee

    TechNet Community Support

    • Marked as answer by AnupamV Thursday, August 28, 2014 11:56 PM
    Thursday, August 28, 2014 9:17 AM
  • thanks, thats what I was assuming but good to see this confirmed
    • Edited by AnupamV Thursday, August 28, 2014 11:56 PM
    Thursday, August 28, 2014 6:37 PM