Search found 2 matches

by vovanius
03 Oct 2009 10:50
Forum: DOS Batch Forum
Topic: IP's from netsh command
Replies: 1
Views: 4148

Solved: @echo off call :get_dns_servers echo %primary_dns_server% echo %secondary_dns_server% pause exit :get_dns_servers for /f "skip=2 tokens=5" %%i in ('netsh interface ip show dns %connection_name%') do set primary_dns_server=%%i & goto get_secondary :get_secondary for /f "ski...
by vovanius
02 Oct 2009 15:12
Forum: DOS Batch Forum
Topic: IP's from netsh command
Replies: 1
Views: 4148

IP's from netsh command

Hello All! I have a problem. I need to use primary and secondary DNS servers IPs in cmd script. But how can I get them and assign to corresponding variables? I tried so: Command netsh interface ip show dns "Internet" gives the output: Configuration for interface "Internet" Static...