Created
June 20, 2020 03:35
-
-
Save MarkZhangTW/7acf038cb025fce855e84562315f23f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-NetFirewallRule | | |
Where-Object Direction -eq Inbound | | |
Format-Table -Property DisplayName, Enabled, Profile, Direction, Action, ` | |
@{Name='Protocol';Expression={($PSItem | Get-NetFirewallPortFilter).Protocol}}, ` | |
@{Name='LocalPort';Expression={($PSItem | Get-NetFirewallPortFilter).LocalPort}}, ` | |
@{Name='RemotePort';Expression={($PSItem | Get-NetFirewallPortFilter).RemotePort}}, ` | |
@{Name='IcmpType';Expression={($PSItem | Get-NetFirewallPortFilter).IcmpType}}, ` | |
@{Name='DynamicTarget';Expression={($PSItem | Get-NetFirewallPortFilter).DynamicTarget}} ` | |
-AutoSize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment