Solved

How to determine the computer name from a command prompt (have IP address)

Posted on 2006-11-16
6
2,942 Views
Last Modified: 2012-05-05
Does anyone know of a command in a command prompt (windows XP) to determine what the computer name is when I have an IP address?  Currently, I have to go to the domain controller, open up the DHCP server, and search through the active leases to find out what the computer name is.  I am trying to track down certain computers on my network with certain internet connections, and my firewall only reports the ip address (of course) and I'd like to quickly determine what the name of the computer is for the ip address that the firewall is giving.

It's kind of frustrating that the simple ping command will give IP address if you have a computer name, but not vice versa.  For example, if I ping "george-pc" it will return what the ipaddress is for George's PC.  If I ping the ip address, it doesn't tell me the computer name.

By the way, I have a single Windows 2003 domain controller, an exchange server and about 35 client machines...mostly WinXP.

Thanks,
Jeff
0
Comment
Question by:jbobst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Expert Comment

by:caddlady
ID: 17958060
how about pathping?
0
 
LVL 8

Assisted Solution

by:caddlady
caddlady earned 50 total points
ID: 17958100
mybad... didn't read enough.

Use:

nbtstat -a ipaddress
0
 
LVL 33

Accepted Solution

by:
NJComputerNetworks earned 75 total points
ID: 17958545
or... use the -a command with the IP address

ping -a 10.10.103.5

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet.
    -i TTL         Time To Live.
    -v TOS         Type Of Service.
    -r count       Record route for count hops.
    -s count       Timestamp for count hops.
    -j host-list   Loose source route along host-list.
    -k host-list   Strict source route along host-list.
    -w timeout     Timeout in milliseconds to wait for each reply.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 33

Expert Comment

by:NJComputerNetworks
ID: 17958559
could also use NSLOOKUP


NSLOOKUP 10.12.1.43 <enter>
0
 
LVL 1

Author Comment

by:jbobst
ID: 17958728
Thanks, all those options worked!

(I did have a machine on my network though, that wasn't a domain member so the ping -a and the nslooup didn't work for that particular machine)
0
 
LVL 2

Expert Comment

by:thelastoftheend
ID: 17971705
I like the "ping -a x.x.x.x" command the most, but sometimes when that doesn't work, this will: "nbtstat -a x.x.x.x". This will sometimes show the logged on user as well.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

690 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