Check whether the Windows firewall is enabled

Show the on/off state of all three firewall profiles with one netsh command.

WindowssecuritystatusfirewallMedium risk
Run `netsh advfirewall show allprofiles state` — each profile (Domain, Private, Public) should read ON.

01Command

Command
$ netsh advfirewall show allprofiles state

02What it does

Windows has three firewall profiles, and the active one depends on the current network category; malware and "tweaks" sometimes disable them. This command prints the state of all three at once. To turn a profile back on, run `netsh advfirewall set allprofiles state on`.

03Risk

RiskMedium risk
!Warning: Do not disable the firewall to "fix" an app — create a specific allow rule instead; disabling it exposes every open port.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-NetFirewallProfile
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Returns Domain, Private and Public firewall profiles with their Enabled state.
  • netsh
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents netsh WLAN commands including `netsh wlan show profile name=... key=clear` and `netsh wlan delete profile name=...`.

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions