I have the following command line:
netsh interface ip set dns "optus" static 18.104.22.168 primary
I use it to change the default dns server after i connect to my isp.
Is there a way I can do this programatically? is there an api call that does this function without calling NETSH??