No announcement yet.

Script to import firewall settings into gpedit

  • Filter
  • Time
  • Show
Clear All
new posts

  • Script to import firewall settings into gpedit

    hello all,

    i am trying to find a solution to automate importing firewall rules (.wfw) so that it is viewable and manageable from gpedit.msc. I already know how to automate and import the firewall rule set into the advanced firewall setting in the control panel but doing that does not make them viewable and manageable from gpedit.msc

    "netsh advfirewall import firewallrules.wfw" only imports them to be viewable and manageable from the advanced firewall option in the control panel. If i manually import the config file into gpedit from Local Computer Policy - Computer configuration - Windows settings - Security settings - Windows Firewall with advanced security, it naturally overwrite the settings manageable from the control panel.

    I need help with automating the above. This is automated deployments. I know I can do it by hand but thats not what I am looking for. Constraints, this is a Server 2012 R2 member server standalone on a workgroup, so its all local, so no AD logon scripts, domain gpos, etc. Its not really important why I need to do this, I just do.

    Any help is kindly appreciated. I have looked but cannot find a solution so far that works given the above.

    thanks in advance

  • #2
    Re: Script to import firewall settings into gpedit

    If you open the local policy and expand to the Windows Firewall node, you can right-click and import a policy.

    Network Consultant/Engineer
    Baltimore - Washington area and beyond


    • #3
      Re: Script to import firewall settings into gpedit

      thanks but that's by hand. that's not automated.