Posted on 2006-03-25
Last Modified: 2008-03-06
I am currently trying to create an nslookup.cmd which will run on a number of addresses that are read from a text file.  I want it to have and output file also which logs the successful/unsuccessful nslookups.  Any ideas?  I know this can be easily done with Ping and tracert but I have been having problems with nslookup.
Question by:bigtazz
    1 Comment
    LVL 19

    Accepted Solution

    nslookup is deprecated so will not be supported for ever. The recommended replacements are host and dig. A simple solution is :
    create a text file, say  IPs_to_find.txt

    Then from command line,

    dig -f IPs_to_find.txt +short >> ip_log.txt

    This will append the short form output of dig to a text file  for all the lookup results  of addresses in IPs_to_find.txt.  Use dig -h to see more options.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    The viewer will learn how to implement Singleton Design Pattern in Java.
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now