Set DNS servers from Command prompt

Print Friendly

Open an elevated command prompt and type:

netsh

In order to view all network connections:

interface ip show config

In order to change the primary dns server:

interface ip set dns name="Local Area Connection" static 8.8.8.8

For the secondary DNS run:

netsh interface ip add dns name="Local Area Connection" 1.1.1.1 index=2
This entry was posted in Windows. Bookmark the permalink.

Leave a Reply

Your email address will not be published.