Windows Instructions - Much simpler via Powershell commands


#1

Hi,

instead of those long and borring instructions, add:

  1. Start Powershell as Administrator
  2. Paste this commands:

Windows 8/10:

Get-DnsClientServerAddress -AddressFamily IPv4 | ? ServerAddresses -NE $null | Set-DnsClientServerAddress -ServerAddresses 1.1.1.1, 1.0.0.1
Get-DnsClientServerAddress -AddressFamily IPv6 | ? ServerAddresses -NE $null | Set-DnsClientServerAddress -ServerAddresses 2606:4700:4700::1111, 2606:4700:4700::1001

Windows 7:
https://pastebin.com/w1CV278Q

That’s it!


#2

As a PowerShell hack who dreams of some day knowing 1/10,000th of what Thomas Lee does… it appears your script will get the DNS server settings (IP4/6) for each interface where that value is filled (so ignoring unused adapters or adapters intentionally not using DNS) and will set them to the Cloudflare IPv4/6 values.

Did I read that correctly?


#3

Yes, exactly. Alternative for the user is to manually check for desired InterfaceAlias from “Get-DnsClientServerAddress” output and use value for the Set-DnsClientServerAddress. But the key is to have click and forget commands. Let’s not waste user time :slight_smile:


#4

Awesome thank you! I recently did a little PowerShell scripting for a customer with our new Argo Tunnels tool, so my brain was less rusty on the topic than usual.

I will pass along this tip to the team that maintains the website.


#5

That would be great! I am glad that I could support the project somehow. Thanks!


#6

I can’t edit my own post: it’s only for Windows 8.1/10, I can write Windows 7 version if you like.


#7

Sure! I’ll add it to the same internal ticket.


#8

ok but it will take a while to polish it


#9

@cscharff Windows 7 version added but even pasting it as ‘Formatted Text’ removes dolar $_ from code! Very strange bug.