Summary: Use Windows PowerShell to list firewall rules configured in Windows Server 2012 R2.
How can I use Windows PowerShell to show the inbound firewall rules in Windows Server 2012 R2 that are enabled?
Use the Get-NetFirewallRule cmdlet to get the entire list, and then
filter on the Enabled and Direction properties:
Get-NetFirewallRule | Where { $_.Enabled –eq ‘True’ –and $_.Direction –eq ‘Inbound’ }