Answer the question
In order to leave comments, you need to log in
How to add tcp/udp ports to firewall via Powershell exceptions?
Greetings!
Please tell me how to add private, local, domain tcp & udp connections to the firewall exceptions via pwsh
For example, in this way you can add several tcp
New-NetFirewallRule -DisplayName "WHITELIST TCP" -Direction inbound -Profile Any -Action Allow -LocalPort 80,8080, 8090 -Protocol TCP
but what about udp?
Answer the question
In order to leave comments, you need to log in
but what about udp?Exactly the same command, only in the -Protocol parameter specify the desired protocol: TCP, UDP, ICMPv4 or ICMPv6
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question