Hee, Les beat me to it but here's my take:

Code:

break on

$output = "c:\ipconf.txt"

shell '%comspec% /c ipconfig | findstr /i "10.0.0" >$output'

$ip = "not found"

if exist($output)
if open(1, $output) = 0
$ip = readline(1)
if $ip
$ip = trim(split($ip,":")[1])
endif
$= close(1)
endif
endif

?"ip=" $ip

exit 0