Created
December 6, 2018 21:26
-
-
Save mansouryaacoubi/7606ef242d06811426d79be2a755b4f1 to your computer and use it in GitHub Desktop.
Batch to retrieve IP Address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
FOR /F "tokens=2,3" %%A IN ('ping %computername% -n 1 -4') DO IF "von"== "%%A" set "IP=%%~B" | |
echo %IP:~0,-1% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment