> ## Content Index
> Fetch the complete content index at: https://www.filipkonopik.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# PowerShell: Get Firewall Rules
- URL: https://www.filipkonopik.com/powershell-get-firewall-rules/
- Published: 2026-07-27T11:21:48.000Z
- Updated: 2026-08-06T05:46:28.000Z
- Author: Filip Konopík
- Tags: Connectivity

Need to check Windows Firewall rules - for security auditing or troubleshooting a blocked connection? This one-liner pulls the active rules straight from the system.

Prerequisites:

- Privileges: None
- Module: Built-in, no import needed

Quick Command:

```Powershell
Get-NetFirewallRule -Enabled True | Select-Object DisplayName, Direction, Action -First 10
```

Example Output:

```powershell
DisplayName                          Direction Action
-----------                          --------- ------
Network Discovery (SSDP-Out)         Outbound  Allow
Remote Assistance (TCP-Out)          Outbound  Allow
Core Networking - IPv6 (IPv6-In)     Inbound   Allow
File and Printer Sharing (SMB-In)    Inbound   Allow
```

📦

****Want all of them at once?**  
Get every free one-liner from this blog in a single downloadable bundle organized by category, each with full comment-based help. No more copy-pasting one at a time.

[Get the Complete Bundle for $39](https://gum.co/u/oczvkqdc?ref=filipkonopik.com)

How It Works:

- Get-NetFirewallRule returns every firewall rule configured on the system - Windows ships with hundreds of built-in rules by default, most of them disabled, so filtering is essential.
- \-Enabled True filters down to only rules that are actively enforced, skipping the large number of disabled/inactive default rules.
- DisplayName shows a readable description of what the rule covers, Direction shows whether it applies to Inbound or Outbound traffic, and Action shows whether matching traffic is Allowed or Blocked.
- \-First 10 limits the output, since even the enabled rule set alone is typically dozens of entries.