Set DNS servers from Command prompt

Print Friendly

Open an elevated command prompt and type:


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

For the secondary DNS run:

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

Leave a Reply

Your email address will not be published.