A headless Hyper-V core server in my lab wouldn't accept RDP connections because it couldn't authenticate the incoming username due to an invalid DNS configuration on its NIC.
Connecting a monitor and keyboard would've been too easy
A remote Powershell session (authenticated as the server's local administrator) worked...
Enter-PSSession -ComputerName COMPUTER -Credential USER
...but sconfig wouldn't run.
Fear not, you can see your entire network configuration by running netsh dump. To set the primary DNS server to 22.214.171.124 on my Server 2012 R2 host with a network interface called "vEthernet (External_Internal)":
netsh interface ip set dnsservers "vEthernet (External_Internal)" static 126.96.36.199 primary