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

/alak

Comments

Popular posts from this blog

Quick Dirty Script for Checking Oracle Data Gurad Gap and Emailing it

SAP SWPM Software Provision Manager SL Toolset 1.0 SP22 Startup Options

SAP SystemCopy - Activation of TCI Notes, DigiSIgn Gone Wrong