Thanks for the help, Xboxer
Code: Select all
@Echo Off
Set "Domain=Yahoo.com."
IPConfig /Flushdns >Nul 2>&1
:: ISP HOST NAME
For /F "Usebackq Tokens=2" %%B In (`Nslookup %Domain% ^| Find "Server"`) Do Set HostName=%%B
Echo. %HostName%
Pause>Nul
Moderator: DosItHelp
Code: Select all
@Echo Off
Set "Domain=Yahoo.com."
IPConfig /Flushdns >Nul 2>&1
:: ISP HOST NAME
For /F "Usebackq Tokens=2" %%B In (`Nslookup %Domain% ^| Find "Server"`) Do Set HostName=%%B
Echo. %HostName%
Pause>Nul
Code: Select all
nslookup yahoo.com 2>nul |find "Server"
Code: Select all
nslookup yahoo.com 2>&1 | find "Server"
Code: Select all
For /F "Usebackq Tokens=2" %%B In (`nslookup yahoo.com 2>nul |find "Server"`) Do Set HostName=%%B
Echo. %HostName%
Pause>Nul
Code: Select all
For /F "Tokens=2 Delims=:" %%B In ('Echo quit^|Nslookup^|Find "Server"') Do Set HostName=%%B
Code: Select all
For /F "Usebackq Tokens=2" %%B In (`Nslookup Yahoo.Com 2^>Nul ^| Find "Server"`) Do Set HostName=%%B
Echo. %HostName%
Pause>Nul