Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR POWERSHELL

How to display firewall rule ports with powershell

Get-NetFirewallRule -DisplayGroup 'Remote Desktop' |
Format-Table -Property Name,
DisplayName,
DisplayGroup,
@{Name='Protocol';Expression={($PSItem | Get-NetFirewallPortFilter).Protocol}},
@{Name='LocalPort';Expression={($PSItem | Get-NetFirewallPortFilter).LocalPort}},
@{Name='RemotePort';Expression={($PSItem | Get-NetFirewallPortFilter).RemotePort}},
@{Name='RemoteAddress';Expression={($PSItem | Get-NetFirewallAddressFilter).RemoteAddress}},
Enabled,
Profile,
Direction,
Action
Source by itluke.online #
 
PREVIOUS NEXT
Tagged: #How #display #firewall #rule #ports #powershell
ADD COMMENT
Topic
Name
8+2 =