How to Check Windows Firewall Status with PowerShell

This post will help you to check your local Windows Firewall status using PowerShell, whether it’s off or on for each Profile.

PowerShell commands follow standards and use verb-noun pairs for cmdlets. The verb at the start of the command describes the action the cmdlet performs, and the noun part is the action being performed. Here’s a list of Common Verbs, another Microsoft Docs link. The place of truth as I call it.

In this demo, we’re running Get-NetFirewallProfile with Format-Table
We’re getting the Firewall Profile status, and also formatting it into a table after a pipe ‘|’ –

# get local firewall status powershell
Get-NetFirewallProfile | Format-Table Name, Enabled
Get-NetFirewallProfile

The Windows Firewall on this machine is enabled, for all Profiles <- have a look at this MS Docs link to know more about Windows Firewall Profiles.

Internal follow-up links:
# How To Disable Windows Firewall With PowerShell
# How To Enable Windows Firewall With PowerShell


Comments

One response to “How to Check Windows Firewall Status with PowerShell”

  1. […] similar/useful posts I have on this include the following:# How to Check Windows Firewall Status with PowerShell# How to Enable Windows Firewall with PowerShell# How to Disable Windows Firewall with […]

Leave a Reply

Your email address will not be published. Required fields are marked *