PowerTip: Use PowerShell to Find Domain-Enabled Firewall Rules

Summary: Learn how to identify domain firewall rules by using Windows PowerShell 3.0 on Windows 8 or Windows Server 2012.

Hey, Scripting Guy! Question How can I find specific Domain profile firewall rules on my computer running Windows 8 or Windows Server 2012?

Hey, Scripting Guy! Answer Use the Get-NetFirewallRule cmdlet and specify the enabled parameter as true and filter on the domain profile, as shown here.

Get-NetFirewallRule -Enabled true | Where profile -eq 'Domain'


Comments (1)

  1. Vinoth says:

    I am getting following error, do i need to enable any module

    The term 'Get-NetFirewallRule' is not recognized as the name of a cmdlet, function, script file, or operable program. C

    heck the spelling of the name, or if a path was included, verify that the path is correct and try again.

    At line:1 char:20

    + Get-NetFirewallRule <<<<  -Enabled true | Where profile -eq 'hq.target.com'

       + CategoryInfo          : ObjectNotFound: (Get-NetFirewallRule:String) [], CommandNotFoundException

       + FullyQualifiedErrorId : CommandNotFoundException

Skip to main content