Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For Linux, this command should return the DNS record for the LDAP server

host -t srv _ldap._tcp.DOMAINNAME

(found at Authenticating from Java (Linux) to Active Directory using LDAP WITHOUT servername)

How could I get the same on the Windows command line using nslookup?

I tried

nslookup -type srv _ldap._tcp.DOMAINNAME

(following http://support.microsoft.com/kb/200525), would this be correct?

share|improve this question

2 Answers 2

up vote 13 down vote accepted

You need to use an = after -type:

nslookup -type=srv _ldap._tcp.DOMAINNAME
share|improve this answer
    
still can't get –  İlhan Çetin Mar 13 '13 at 7:09

Windows cmd prompt uses "query" instead of "type" for some forsaken reason. Interactive nslookup still uses "set type=srv".

nslookup -query=srv _ldap._tcp.DOMAINNAME

EDIT: while "query" works it seems that I am 100% wrong. "type" works too.

share|improve this answer
    
Are you sure about that? nslookup -type=srv _ldap._tcp.DOMAINNAME works as expected on Windows. –  jscott Sep 7 at 4:29
    
I stand corrected. Comment updated, thanks. –  Andy Sep 9 at 9:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.