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
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
Leave a Reply