nslookup
A Swiss army knife of a tool for finding internal/external network resources
Finding domain controllers and saving them to a text file
nslookup -type=SRV _ldap._tcp.dc._msdcs.DOMAIN.COM | awk '{ print $7 }' | sed 's/\.$//g' | sed '/^$/d' | sort > dcs.txt