@Echo off Setlocal ENABLEDELAYEDEXPANSION Call IPAddress For /l %%a in (1,1,%IPAddress.NumberOfAddresses%) do ( Echo Connection #%%a Echo IP Address. . . . . . . . . . . . : !IPAddress%%a! Echo Subnet Mask . . . . . . . . . . . : !IPAddress%%a.SubnetMask! Echo Network . . . . . . . . . . . . . : !IPAddress%%a.Network! Echo Default Gateway . . . . . . . . . : !IPAddress%%a.DefaultGateway! Echo. Echo. )