There is already a script to do this at https://scripts.comodo.com/frontend/…odo-dome-agent but it needs a little work. Seems that when Shield is uninstalled it doesn’t set the NICs back to using DHCP for getting the DNS settings. It sticks with the loopback.
Could this get updated to handle that change as well?
The minor changes which you have requested after uninstalling Comodo Shield agent for getting DNS settings from DHCP are somehow is not clear for proceeding with your request.
So please provide us some more information about loopback settings to continue further.
Somehow we have tried to perform your request but still, we cant able to find a way
wmic nicconfig where (IPEnabled=TRUE) call SetDNSServerSearchOrder ()
wmic nicconfig where (IPEnabled=TRUE) call SetDNSServerSearchOrder (“8.8.8.8”)
wmic nicconfig where (IPEnabled=TRUE) call SetDNSServerSearchOrder (“8.8.8.8”, “8.8.4.4”)
wmic nicconfig where “(IPEnabled=TRUE) and (Description = ‘Local Area Connection’)” call SetDNSServerSearchOrder (“8.8.8.8”, “8.8.4.4”)
netsh interface ip set address “Local Area Connection” dhcp
netsh interface ip set dns “Local Area Connection” dhcp
So could you please try and suggest any of working command function for proceeding?