MS-DOS and Windows command line nslookup command
Nslookup is an MS-DOS utility that enables a user to look up the IP address of a domain or host on a network. The nslookup command can also perform a reverse lookup using an IP address to find the domain or host associated with that IP address.
Nslookup is an external command that is available for the following Microsoft operating systems as nslookup.exe.
Windows Vista and later syntax
nslookup [-opt ...] # interactive mode using default server
nslookup [-opt ...] - server # interactive mode using 'server'
nslookup [-opt ...] host # only look up 'host' using default server
nslookup [-opt ...] host server # only look up 'host' using 'server'
Windows XP syntax
Commands: (identifiers are shown in uppercase,  means optional)
|NAME||Print info about the host/domain NAME using default server.|
|NAME1 NAME2||Same as the command listed above, but uses NAME2 as the server.|
|help or ?||Print info on common commands.|
|set OPTION||Set an option.
|server NAME||Set default server to NAME, using the current default server.|
|lserver NAME||Set default server to NAME, using the initial server.|
|finger [USER]||Finger the optional NAME at the current default host.|
|root||Set the current default server to the root.|
|ls [opt] DOMAIN [> FILE]||List addresses in DOMAIN (optional: output to FILE).
|view FILE||Sort an 'ls' output file and view it with pg.|
|exit||Exit the program.|
This command is often used to perform a reverse lookup on an IP address as shown in the example below. The first section specifies the domain name of the requested server. The IP address for that server is displayed in the second section.
Running nslookup without specifying an IP address or domain name displays your router's server and address. To get out of the > prompt, type exit and press Enter.