CODE: [Copy to clipboard]@ECHO OFF for /f "tokens=1* delims=:" %%i in ('ipconfig /all^|find "DHCP Server"') do set dip=%%j echo %dip% pause EXIT