Worklet: Update DNS entries on Windows

Hi all, in response to a users query on here I thought I’d post a quick and easy way to update your primary and secondary DNS entries on your devices. Be sure to amend the “Ethernet*” in -InterfaceAlias to target your desired network adapters and edit the “”,“” to your specified DNS servers

Be sure to test first, this will also output those amended network adapters to your Reports > Activity log


Exit 0


Set-DnsClientServerAddress -InterfaceAlias "Ethernet*" -ServerAddresses @("","")
Get-DnsClientServerAddress -InterfaceAlias "Ethernet*" | Select InterfaceAlias,ServerAddresses

Or use Interface Index parameter - Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses (“”, “”)