None of the answers are working for me on Windows 10, so here's what I use:
@echo off
set DNS1=8.8.8.8
set DNS2=8.8.4.4
set INTERFACE=Ethernet
netsh int ipv4 set dns name="%INTERFACE%" static %DNS1% primary validate=no
netsh int ipv4 add dns name="%INTERFACE%" %DNS2% index=2
ipconfig /flushdns
pause
This uses Google DNS. You can get interface name with the command netsh int show interface