How to find DoH DNS Servers using Powershell?

Powershell offers an easy way to find the DoH DNS Servers through the Powershell in-built cmdlet. We will discuss the cmdlet that can be used to fetch DoH DNS servers for a local or remote computer.

Before we discuss the cmdlet to find DoH servers information, it may be pertinent to share a few basics about the DoH services. DoH servers correspond to DNS over HTTPS servers. These servers engage in DNS traffic over HTTPS port.

DNS server information and DNS traffic are encrypted and this protects network information from being sniffed at by intruders. DoH DNS server support has been enabled by Microsoft in Windows 10 and Windows 11. You can enable or disable DoH DNS support from the Settings option in Windows 11.

When you enable DNS over HTTPS (DoH), you will need to choose the DNS template. You could work on choosing an automatic DoH template or provide one manually.

Now, we will find details of the DoH DNS servers for a specific system. It is possible that your system may be inheriting DoH DNS services from one of your telecom providers. This is especially true for network providers providing IPv6 DNS services.

Open Powershell on your Windows computer. You can type pwsh in the command prompt or in the search box. This should bring up a Powershell session on the computer. I, generally, use the pwsh in the search box. This allows me to select Powershell and run it with administrative privileges.

pwsh command

Once you are logged in to the Powershell session, you will need to use the following cmdlet to bring up DoH DNS servers on your computer:

get-dnsclientdohserveraddress

The output of this command is shared below as a screenshot:

DoH DNS servers using Powershell

As you can see, the output of this command shares all the DNS services that are capable of providing DNS services over an HTTPS port.

The important aspects of the command output include the DNS server address and the DNS DoH template being used on the DNS server. For example, we see that 8.8.8.8 and 8.8.4.4 are Google’s DNS servers. These Google DNS servers use the DoH Template at https://dns.google/dns-query to organize DoH or DNS over HTTPS data for you.

On a similar note, you can see that the Cloudflare DNS entries correspond to DNS servers 1.1.1.1 and 1.0.0.1. The corresponding DNS template for DoH servers is hosted at https://cloudflare-dns.com/dns-query.

Finally, the Quad9.net entries correspond to free recursive DNS services for IPv6 service providers. Quad9 offers free DoH DNS services. In my case, the Quad9 entries have been inherited from the network provider.

Rajesh Dhawan

Rajesh Dhawan is a technology professional who loves to blog about smart wearables, Cloud computing and Microsoft technologies. He loves to break complex problems into manageable chunks of meaningful information.