Let's start our tutorial on nslookup by looking at how to start and stop it. You can run nslookup either interactively or noninteractively. If you want to look up only one piece of data, you should use the noninteractive form. If you plan on doing something more extensive, such as changing servers or options, use an interactive session.
To start an interactive session, just type nslookup:
C:\> nslookup Default Server: terminator.movie.edu Address: 188.8.131.52 > ^Z
If you need help, type ? or help.
When you want to exit, type ^Z (Ctrl-Z) and press Enter. You can also exit from nslookup with ^C or ^Break (Ctrl-Break). This behavior is different from nslookup's operation on a Unix host, where if you send nslookup an interrupt, it catches it, stops whatever it is doing (like a zone transfer), and gives you the > prompt. There's no way to just interrupt Microsoft's nslookup: you just have to stop nslookup completely and restart it.
For a noninteractive lookup, include the name you are looking up on the command line:
C:\> nslookup carrie Server: terminator.movie.edu Address: 184.108.40.206 Name: carrie.movie.edu Address: 220.127.116.11