Command needed on the server

Peter_1985 2,691 Reputation points
2024-12-31T03:51:10.1566667+00:00

Hi,

Within a Windows server, such as Powershell, can you list out whatever Inbound/Outbound rules (of the firewall)?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,501 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,592 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shikha Ghildiyal 1,400 Reputation points Microsoft Employee
    2024-12-31T03:56:00.8333333+00:00

    Hi Peter_1985,

    Thanks for reaching out to Microsoft Q&A.

    You can use Get-NetFirewallRule command

    Example- Get-NetFirewallRule -PolicyStore ActiveStore

    Please check this document for all examples and syntax- https://learn.microsoft.com/en-us/powershell/module/netsecurity/get-netfirewallrule?view=windowsserver2022-ps

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.