Show which DC is being used in an AD Forest from a Mac

lsof -P -n -i | grep -i 389

while true ; do lsof -P -n -i | grep -i 389 ; done


#This one forces an OD lookup for an unknown user, forcing OD to talk to AD
id unknownuser &>/dev/null ; lsof -P -n -i | grep -i 389 | cut -d ">" -f2 | awk '{ print $1 }' | cut -d ":" -f1 | while read adip ; do echo "$adip : `host $adip`" ; done