How can I use nslookup to find the GC and DC in DNS for Microsoft AD ?
To find the GC (global catalog) that are listed in DNS
nslookup
> set type=srv
> _ldap._tcp.gc._msdcs.comapny.com
Server: adsrv1.example-cloud.com
Address: 192.168.1.251
_ldap._tcp.gc._msdcs.example-cloud.com SRV service location:
priority = 0
weight = 100
port = 3268
svr hostname = adsrv1.example-cloud.com
adserv1.example-cloud.com internet address = 192.168.1.251
To find the DC (domain controllers) that are listed in DNS
nslookup
set type=srv
_ldap._tcp.dc._msdcs.example-cloud.com
Server: adsrv1.comapny.com
Address: 192.168.1.251
_ldap._tcp.dc._msdcs.example-cloud.com SRV service location:
priority = 0
weight = 100
port = 389
svr hostname = adsrv2.example-cloud.com
_ldap._tcp.dc._msdcs.example-cloud.com SRV service location:
priority = 0
weight = 100
port = 389
svr hostname = adsrv1.example-cloud.com
adsrv2.example-cloud.com internet address = 192.168.1.33
adsrv1.example-cloud.com internet address = 192.168.1.25
If you find that you have some invalid entries, you have to delete those by hand. If you are missing entries you can try Use DcDiag /Fix or NetDiag /fix (on each server) to re-enter them.