Quantcast
Channel: The Accidental IT Guy » 2012
Viewing all articles
Browse latest Browse all 6

How to enable Firewall TCP ports on Windows Server using powershell

$
0
0

If you ever need to powershell script the allowing of traffic through the builtin windows firewall, its very easy to do.

New-NetFirewallRule -DisplayName “Enterprise Commander HTTP” -Direction Inbound –Protocol TCP –LocalPort 80 -Action allow

New-NetFirewallRule -DisplayName “Enterprise Commander SSL” -Direction Inbound –Protocol TCP –LocalPort 443 -Action allow

The above commands poke holes in the firewall for port 80 and 443. You then just need to enable the profile with the following.

Set-NetFirewallProfile -DefaultInboundAction Block -DefaultOutboundAction Allow -NotifyOnListen True -AllowUnicastResponseToMulticast True

Job done.



Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images