My local ISP’s router won’t let me modify dns settings in it’s dhcp table. (no drew Joy), now I’m going to have to add a separate router.. while I waiting for my router, I created the following powershell code to point my boxes to google dns.
The following PS code will:
- look for a nic with an active gateway
- apply google dns server definitions for both ipv4 and ipv6
Tested on Windows 8.1, 10, W2k12R2, W2k16
#requires admin ps (changing dns), Powershell 3+ (use $PSVersionTable to PS version)