Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 10374

Using PowerShell to Close Firewall Port

$
0
0

I'm doing some end to end testing of an application and I need to be able to close then open a port in Windows Firewall using PowerShell commands. I've found a script that adds a firewall rule to open a port, but I also need to be able to close the port.

Script to open - http://social.technet.microsoft.com/Forums/scriptcenter/en-US/1173b550-9f19-495f-bf70-ea12e3a73866/using-powershell-to-open-ports-on-on-a-windows-2008-server?forum=ITCG

Is it possible to close the port in similar fashion? I need to close it first, do an operation, then re-open it and perform another operation. Hopefully the commands will work on Windows 7 (for testing locally), and Server 2008 and up.


Viewing all articles
Browse latest Browse all 10374

Latest Images

Trending Articles



Latest Images