I have the following to change DNS settings on remote computers.
$dnsservers = "192.168.60.4","192.168.60.51"
Why you don't use Set-DnsClientServerAddress? With this you can use the parameter -ErrorAction Stop, and you could put the whole thing in a try/catch construct.
You must be logged in to reply to this topic.