Skip navigation
Check firewall exceptions using PowerShell

Check firewall exceptions using PowerShell

Q. How can I check if firewall exceptions are enabled using PowerShell?

A. Using the Get-NetFirewallRule cmdlet you can easily check for specific exceptions and view their status. For example to view all DNS related firewall exceptions I would use:

Get-NetFirewallRule | where {$_.Name -like "*DNS*"} | fl Name,Enabled,Profile,Direction

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.