Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to get the computer name remotely based on an IP address?

I have several windows machines identified by ip address. I would like to write an application that query the computers remotely and gets their name. I cannot rely on DNS because it does not provide exact results.

I heard that there is a NetBIOS API that can be used, but I am not familiar with this API.

like image 750
gyurisc Avatar asked Mar 09 '10 13:03

gyurisc


1 Answers

PING -A xxx.xxx.xxx.xxx

This will try WINS and then DNS.

The NSLOOKUP command does similar, but only via DNS.

like image 179
Jay Avatar answered Sep 18 '22 18:09

Jay