Just to expand on Amadeu's great answer, here's a variant of that that strips off the beginning part. (must be run as a batch file)
@ECHO OFF FOR /F "tokens=*" %%i in ('ipconfig ^| find "IPv4"') do SET result=%%iecho %result:IPv4 Address. . . . . . . . . . . : =% | clip