automation of nslookup

At the end of every month, I have to do reporting which involves manually doing nslookup of
IP addresses against whois (, etc) of about 60 IP addresses.

Give the list of IP addresses in a text csv file in Windows, will need an automated way to look up
each of the IP, do a "whois" against one of those websites & populate into say a csv file for each
of the IP the owner of the IP.

need to do this in Windows if possible as I rarely have access to a Linux which has Internet
access.  So the output will be something like:, Kuala Lumpur Packet 1 Networks, AS23724 ChinaNet
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dirk MareSystems Engineer (Acting IT Manager)Commented:
Look at the following article i used it not to long ago for a similar project.

After creating the file set it to run as a task (monthly)

Bill PrewIT / Software Engineering ConsultantCommented:
Can you be more specific about the exact steps you use today, and what info you are getting from NSLOOKUP, and WHOIS?

There are a lot of existing free utilities that do things like this, and typically more, but they might be overkill for you.

Also, for windows BAT scripting, you could consider a tool that does the WHOIS work, like:

sunhuxAuthor Commented:
>be more specific about the exact steps you use today
I copy IP address one by one from a csv file & paste them one at a
time into, enter a 3-4 digit number to prove
I'm not a robot & then Submit to get who owns the IP address

So from nirsoft link given above, which of the following is the tool closest to my need?
WHOIS Servers List
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

sunhuxAuthor Commented:
Dirk's solution looks good but I haven't tested it yet
Bill PrewIT / Software Engineering ConsultantCommented:
Can you provide a test list of IPs for testing, want to make sure my approach handles the various IPs you are searching.

Bill PrewIT / Software Engineering ConsultantCommented:
If you want to try a test, get the WHOSIP utility from NIRSOFT, and then try this small BAT script that will read the ip list you specify near the top of the BAT, and loop through each line sending that IP to WHOSIP, and getting the Owner Name from the results.

@echo off

set IpList=ips.txt

for /f "usebackq tokens=1" %%A in ("%IpList%") do (
  for /f "tokens=2 delims=:" %%B in ('whosip %%~A ^| find /i "Owner Name:" ^| more') do (
    for /f "tokens=*" %%C in ("%%~B") do (
      echo %%A="%%~C"

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.