Change IP and DNS by command in Windows
- Run command prompt as administrator
- Check interface name
netsh interface show interface
- Check you current network information
netsh interface ipv4 show config
- Now use the belows command change your IP and DNS (For this example change on interaface Wi-Fi).
netsh interface ipv4 set address name="YOUR INTERFACE NAME" static IP_ADDRESS SUBNET_MASK GATEWAY
- Recheck your IP and DNS was changed by run command on No.3 again.
netsh interface ipv4 show config
Change Only DNS command
netsh int ipv4 set dns name="Ethernet" static 8.8.8.8 primary validate=no
netsh int ipv4 add dns name="Ethernet" 8.8.4.4 index=2
Ref: howtogeek.com