How to get the default DNS server of a NetAdapter without resetting the addresses on the Adapter?
Solution 1:
The value is cached for each interface in DhcpNameServer in HKLM:\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\
$InstanceID = (Get-NetAdapter).InstanceID
Get-ItemProperty "HKLM:\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\$InstanceID" -Name DhcpNameServer | Select-Object -ExpandProperty DhcpNameServer