DNS settings

(imported topic written by donduke91)

Is there an easy way to obtain the DNS settings, mainly the listing of DNS servers that all our Windows servers in the network are configured to use.

I can look up the data in “NameServer” in the reg key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces{56D5A1D7-34A7-4BEE-802F-0103A39DBF59}

but the “adapter ID” will be different for each server.

(imported comment written by donduke91)

Oops, never mind… didn’t realize it was a retrieved property.

addresses of dns servers of network

Thanks.

(imported comment written by thesurg3on91)

how can i query the retrieved property of my primary dns ip address as a column in the computers view. also how can i query the retrieved property of my secondary dns ip address?

(imported comment written by khanand91)

here’s one method of doing it:-

primary:

if ( exists addresses of dns servers of network ) then preceding text of first “,” of (concatenation “,” of (addresses of dns servers of network as string)) else “NoDNS”

secondary:

if ( exists addresses of dns servers of network ) then preceding text of first “,” of (following text of first “,” of (concatenation “,” of (addresses of dns servers of network as string))) else “NoDNS”