Looking for a group policy to set primary and secondary dns settings to push down to end users' machines...currently have setup a login script batch file with the following but it is not updating...any help would be appreciated.
@echo off
set dnsserver=primary ip
set dnsserver2=secondary ip
for /f "tokens=1,2,3*" %%i in ('netsh interface show interface') do (
if %%i EQU Enabled (
rem echo change "%%l" : %dnsserver%
netsh interface ipv4 set dnsserver name="%%l" static %dnsserver% both
netsh interface ipv4 add dnsserver name="%%l" %dnsserver2% index=2
)
)
@echo off
set dnsserver=primary ip
set dnsserver2=secondary ip
for /f "tokens=1,2,3*" %%i in ('netsh interface show interface') do (
if %%i EQU Enabled (
rem echo change "%%l" : %dnsserver%
netsh interface ipv4 set dnsserver name="%%l" static %dnsserver% both
netsh interface ipv4 add dnsserver name="%%l" %dnsserver2% index=2
)
)