You could also use 'IPCONFIG /ALL' piped into a text file and then use IsStringInFile to check whether your e.g. DNS server is part of the file or parse the file for more granularity.

Or you can use WMI to check adapter-specific settings.
_________________________
There are two types of vessels, submarines and targets.