title: Get Default Gateway from Batch file
body: <p>I want to return the Default Gateway like i have for the IPv4 but it returns Blank.</p>
  
  <pre><code>for /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "IPv4"') do set ip=%%b
  set ip=%ip:~1%
  echo.
  echo  IP Address is: %ip%
  echo.
  </code></pre>
  
  <p>This is what i have so far but it returns blank, i have tried to alter it but it still returns a blank answer.</p>
  
  <pre><code>for /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "Default"') do set ip=%%b
  set ip=%ip:~2%
  echo.
  echo  The Gateway is: %ip%
  echo.
  </code></pre>
  
  <p>Any ideas how i can do this. and return the default gateway for a given Computer.</p>