You have a server named Server1 that runs Windows Server 2016.
You need to view all of the inbound rules on Server1.
Which cmdlet should you use?
A.
Get-NetIPSecRule
B.
Get-NetFirewallRule
C.
Get-NetFirewallProfile
D.
Get-NetFirewallSetting
E.
Get-NetFirewallPortFilter
F.
Get-NetFirewallAddressFilter
G.
Get-NetFirewallSecurityFilter
H.
Get-NetFirewallApplicationFilter
Explanation:
Examples:-
Get-NetFirewallRule -Direction Inbound <— view inbound rules for all profiles
The following examples shows inbound rule for specific firewall profile.
Get-NetFirewallRule -Direction Inbound | where {$_.Profile -eq “Domain”}
Get-NetFirewallRule -Direction Inbound | where {$_.Profile -eq “Public”}
Get-NetFirewallRule -Direction Inbound | where {$_.Profile -eq “Private”}