This is a quick note how to use nslookup.exe.
Start nslookup and check for domain
C:> nslookup Default Server: ns1.corp.pepsi.local Addresse: 10.10.20.1 > thomasmaurer.ch Default Server: ns1.corp.pepsi.local Addresse: 10.10.20.1 Name: thomasmaurer.ch Address: 217.26.52.30 >
Change Nameserver for search querys
> server ns2.corp.pepsi.local Default Server: ns2.corp.pepsi.local Addresse: 10.10.20.2 >
Set a query type (ex. A,AAAA,A+AAAA,ANY,CNAME,MX,NS,PTR,SOA,SRV)
> set type=mx > thomasmaurer.ch Server: ns2.corp.pepsi.local Address: 10.10.20.2 thomasmaurer.ch MX preference = 10, mail exchanger = mx2.mail.genotec.ch thomasmaurer.ch MX preference = 10, mail exchanger = mx1.mail.genotec.ch mx1.mail.genotec.ch internet address = 217.26.49.141 mx1.mail.genotec.ch internet address = 217.26.49.140 mx2.mail.genotec.ch internet address = 217.26.49.139 mx1.mail.genotec.ch internet address = 217.26.49.142 >
nslookup.exe help
Commands: (identifiers are shown in uppercase, [] means optional) NAME - print info about the host/domain NAME using default server NAME1 NAME2 - as above, but use NAME2 as server help or ? - print info on common commands set OPTION - set an option all - print options, current server and host [no]debug - print debugging information [no]d2 - print exhaustive debugging information [no]defname - append domain name to each query [no]recurse - ask for recursive answer to query [no]search - use domain search list [no]vc - always use a virtual circuit domain=NAME - set default domain name to NAME srchlist=N1[/N2/.../N6] - set domain to N1 and search list to N1,N2, etc. root=NAME - set root server to NAME retry=X - set number of retries to X timeout=X - set initial time-out interval to X seconds type=X - set query type (ex. A,AAAA,A+AAAA,ANY,CNAME,MX,NS,PTR,SOA,SRV) querytype=X - same as type class=X - set query class (ex. IN (Internet), ANY) [no]msxfr - use MS fast zone transfer ixfrver=X - current version to use in IXFR transfer request server NAME - set default server to NAME, using current default server lserver NAME - set default server to NAME, using initial server root - set current default server to the root ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN (optional: output to FILE) -a - list canonical names and aliases -d - list all records -t TYPE - list records of the given RFC record type (ex. A,CNAME,MX,NS,PTR etc.) view FILE - sort an 'ls' output file and view it with pg exit - exit the program