I have been trying to get a VBS script written to change DNS entries on local servers but have been having mad problems. The first problem is deleting all old entries.
Ok I have found this script below but the problems I will run into is that there are 2 active connections, one that needs to be changed and the other that should be changed at all.
On Error Resume Next
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\” & strComputer & “rootcimv2”)
Set colNetCards = objWMIService.ExecQuery _
(“Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True”)
For Each objNetCard in colNetCards
arrDNSServers = Array(“192.168.1.77”)
Can anyone give me advise or point me in a better direction?