How to edit advance firewall in local security policy using powershell? RRS feed

  • Question

  • I'm writing a large script that goes through and applies a load of local policy settings via Powershell. Most of this is done by exporting the current security config via Secedit, passing this to an arraylist, adding/updating values as needed, then exporting the arraylist and importing back using Secedit.

    My issue is that I need to set the local Firewall policy (Computer Configuration\Policies\Windows Settings\Security Settings\Windows Firewall with Advanced Security\Windows Firewall with Advanced Security\Windows Firewall Properties\Domain Profile\Firewall state) and this has caused me to get stuck.

    Tuesday, May 21, 2019 5:46 AM