I Need To Make A Change With My IT Support! Call (225) 706-8414

Using ‘netsh’ to change DNS servers on a Windows Computer

You want to update the DNS servers used by the DNS resolver on a Windows computer using the command-line, either directly on the PC or via a remote command-line.


You need change the DNS servers a machine is using and only have access to the command line. For example, a workstation has it’s DNS server statically assigned and it is incorrect. You may not be able to login as an admin on the console since the machine probably cannot reach a domain controller.  You can use either PSTools or GFI’s Remote Background.

  1. Connect to the machine’s console
  2. Run netsh
  3. At the prompt, switch to ipv4 context:
    netsh> interface ipv4
  4. Add the new DNS server
    netsh interface ipv4> add dnsservers “Local Area Connection” ip-address



Concerned About Cyber Attacks?


Want to Migrate to the Cloud?

Office 365

Ready to Experience Microsoft Office 365?

Want the latest IT news directly in your inbox? Subscribe now!