"Element not found" error when adding dns via netsh command

0

When trying to add dns entries via netsh commands, I get "Element not found" errors.

netsh interface ip set dns “Wi-FI” static 10.0.0.1 1

What is the correct command format for setting both primary and secondary dns via command line?

David d C e Freitas

Posted 2016-04-12T20:13:46.137

Reputation: 3 498

Answers

0

The following format sets the primary and secondary DNS entries correctly on Windows 8:

netsh interface ip set dns “Wi-Fi” static 10.0.0.1
netsh interface ip add dns “Wi-Fi” 10.0.0.2 index=2

David d C e Freitas

Posted 2016-04-12T20:13:46.137

Reputation: 3 498