Key Takeaways:
Learn how to change DNS on Windows, using either the GUI or command-line with PowerShell.
The most common scenario on enterprise computers is for DNS addresses to be handled by either DHCP servers or another IP address management solution. If you have not needed to change this configuration on one or more computers in a while, this guide will help refresh your memory. I will cover both Windows client and server operating systems.
For this guide, I demonstrate how to manually assign alternate DNS settings. Using DHCP to manage DNS is outside the scope of this article.
What if you could change how your Windows 10 device finds every website with just a few clicks? The steps below show the most common ways to modify DNS settings manually.
| Method | Pros | Cons |
|---|---|---|
| Control Panel | Works everywhere, familiar layout, stable interface | Slower for repeated changes |
| Settings app | Modern interface, easier to find for many users | Not consistent across all Windows 10 builds |
| PowerShell | Great for scripting, fast for advanced users, supports automation | Requires command knowledge and careful selection of interface index |
That completes the process.
If you prefer command-line tools, here is how to view and change DNS settings using PowerShell. Open your preferred terminal and run this command to view the current configuration:
Get-DnsClientServerAddress
To remove the second DNS entry and change the first entry to 8.8.8.8, use the following command. Run PowerShell as an administrator.
Set-DNSClientServerAddress -InterfaceIndex 7 -ServerAddresses 8.8.8.8
Run Get-DnsClientServerAddress again to confirm the change.
What if Windows 11 gave you an even easier way to adjust DNS settings? Let’s walk through the options.
We can use the same cmdlets that work on Windows 10.
Get-DnsClientServerAddress
This displays both IPv4 and IPv6 DNS settings.
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 8.8.8.8
Run Get-DnsClientServerAddress again to confirm.
What if server environments handled DNS changes just as easily? Fortunately, they do. Here are the methods for Windows Server.
On Windows Server installations with Server Core, you can adjust DNS settings using SConfig.
Everything looks correct.
You can also view DNS settings using PowerShell on Windows Server 2022.
Get-DnsClientServerAddress
Those addresses match the DNS servers used by my domain controllers. To change to Google’s DNS server:
Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses 8.8.8.8
I ran Get-DnsClientServerAddress again to confirm the change was successful.
Changing DNS server settings in Windows is a straightforward way to troubleshoot TCP/IP issues or adjust performance temporarily. Whether you need to address connectivity problems or optimize your network setup, the ability to modify DNS settings is a powerful troubleshooting tool.
Choose reliable DNS servers and consider speed, security, and organizational policies when adjusting DNS configurations. As demonstrated, you have several methods to view and modify DNS settings across Windows versions.
What if every website required you to remember a string of numbers instead of a name? That is the problem DNS solves. DNS is an acronym for Domain Name System, a long-standing decentralized naming system for computer networks across the globe. Devices that use DNS include desktops, laptops, servers, televisions, IoT devices, and many more.
DNS translates domain names into IP addresses so computers know where to connect. It also provides information for services such as email routing and other domain-related details.
You may find it useful to use an alternate DNS provider to troubleshoot security or performance issues. Popular public DNS providers include OpenDNS, Cloudflare, and Google DNS.
Should you assign DNS servers manually, or let something else do it? There are two main approaches. You can manually assign DNS servers on each device, or allow a system to assign them automatically. DHCP, the most common system for this, provides an easier setup and better long-term administration. You enter DNS details on the DHCP server, and client machines inherit the configuration without manual change.
One note of caution. Before switching a device from DHCP to manual DNS, you should confirm whether the change is appropriate. On Active Directory domain-joined devices, modifying DNS settings may disrupt access to directory services and other key network resources because Active Directory and DNS are tightly integrated.
You can select “Obtain DNS server address automatically” in your adapter’s IPv4 properties or run PowerShell with DHCP parameters on the correct interface.
In some cases, yes. Public DNS providers may respond more quickly than ISP-provided DNS servers. Results vary based on network location.
This may happen if your organization manages device settings, if you lack administrator rights, or if your network adapter has restrictions applied by group policy.
These providers may offer better privacy controls than ISP DNS, but they still receive your DNS queries. You should review each provider’s privacy policy.
Yes, changing DNS is safe. If you enter an incorrect DNS server address, domain names may not resolve, but you can revert to automatic DNS at any time.