I have a group of computers in a remote office that I need to pull the DNS info from. However, the admin at that location renamed the default interface from "Ethernet" to "LAN." This is due to having also a Metadata interface as well so each is distinguishable.
I wrote the following based off another default DNS Extension Attribute that was pre installed on our JSS.
#!/bin/sh
echo "<result>`/usr/sbin/networksetup -getdnsservers LAN 2>&1`</result>"
This works when testing on one of the machines remotely. However when I make a smart group and apply "DNS resolved IS NOT <new DNS IP>" at Location I still retrieve all the machines including a few I manually changed for testing purposes. When viewing Extension Attributes in a machines inventory I see no data output.
Curious what I'm missing.. any insight or help is greatly appreciated!