Disable Windows Firewall

  • 16 November 2021
  • 5 replies

Userlevel 2

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


$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}


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

5 replies


Userlevel 2

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

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?

Userlevel 2

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.

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!