Skip to main content

Disable Windows Firewall

  • November 16, 2021
  • 5 replies
  • 245 views

TJ_Coppola
Forum|alt.badge.img

Here’s a simple worklet for turning off the firewall on your windows PCs.

Evaluation:

$firewallStatusDomain = (Get-NetFirewallProfile -Profile Domain).enabled
$firewallStatusPublic = (Get-NetFirewallProfile -Profile Public).enabled
$firewallStatusPrivate = (Get-NetFirewallProfile -Profile Private).enabled
$fwCheck = 0

if ($firewallStatusDomain) {$fwCheck += 1}
if ($firewallStatusPublic) {$fwCheck += 1}
if ($firewallStatusPrivate) {$fwCheck += 1}

if ($fwcheck -gt 0) {exit 1}
else {exit 0}

Remediation:

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

5 replies

  • November 16, 2021

frysuseating


TJ_Coppola
Forum|alt.badge.img
  • Author
  • Pro
  • November 16, 2021

Not really sure what this means. Are you confused by something?


  • November 16, 2021

Lol nah, I’m just a paranoid former next-gen-firewall guy. 🙂 Which actually presents a pretty good reason for a worklet like this since most firewalls just don’t play nice with each other. I like it/welcome to the AX Community! Care to share the use-case that prompted this?


TJ_Coppola
Forum|alt.badge.img
  • Author
  • Pro
  • November 16, 2021

We have some legacy broadcast appliances that don’t like windows firewall so the computers that manage them have the firewall turned off.

They’re in a pretty isolated VLAN, and we put S1 on everything now, so it’s just not giving us a lot of value for the headache.


  • November 16, 2021

Ah-ha…yup, perfect use-case. Thanks for providing some color/that makes a lot of sense. There’s a lot of stuff WinFW doesn’t play nice with these days. Thank Costanza for the robot that invented VLANs!