Remote DNS Configuration (Windows)

In the event that you need to update the DNS on a domain computer that you do not have physical access to and the users do not have local admin privileges, this might help.

You will need to start by downloading the PSTools suite from Microsoft onto a computer that has local network access or over a VPN.

From there you will need to extract the PSExec.exe application and open an administrative command prompt (Domain Administrator credentials) in that folder.

  • Next you will need to run the PSExec application as seen below.
    psexec \\COMPUTERNAME cmd.exe
  • COMPUTERNAME should be replaced with the name of the computer you want to connect to. 
  • If this is your first time running the application you will likely need to accept the license.

If done properly this will launch a command prompt on the computer you need. If not, it will tell you that it failed.

The next steps are to get the name of the interface you want to change and then update DNS.

  • netsh interface show interface
    • This will get the names of your network adapters, in this case “Local Area Connection”
  • netsh interface ipv4 add dnsserver “Local Area Connection” address=192.168.x.x index=1
    netsh interface ipv4 add dnsserver “Local Area Connection” address=192.168.x.x index=2

The user at the computer should be able to access the internet again after this has been successfully completed.



Published by

Kevin Herr

System Administrator

Leave a Reply

Your email address will not be published. Required fields are marked *