Windows for loop - add multiple ports to exception using netsh.exe

Adding multiple ports to exception list on windows firewall
using netsh.exe comand line utility.

using for loop in windows batch.

for %i in (3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3298 3299 3600 3601) do netsh firewall add portopening TCP %i "SAP Router Port %i - Added by Adam 27-Jan-2012"

or for a port range without skipping:

for /L %i in (9000-9600) do echo %i



Popular posts from this blog

SAP Backdoors {placeholder Post]

Fiori Apps Keep Calling Internal Hostname / Internal FQDN