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