Note: Windows environment (servers & workstations): I'm having a small issue here at work where a server went down and the (not very smart) tech guys don't know which server was until we give them the hostname (which we don't have, as the only guy using it was connecting through its IP instead of the hostname).

The server might be online again by when I get an answer, but just for kicks, is there a way to find out the hostname while being an external computer? My ideas are:

  • Ask the DHCP server with a remote command (though, I'm sure my AD user has no access to login to it :P)

  • Read the DNS cache (we had no success though)

  • Ask the AD server (though I don't think it'll work if the server isn't inside a domain, right? - and same, I might not have access to it)

Phrases like "reverse DNS" and such come to mind, but my networking knowledge isn't very sharp yet.

We also tried stuff like ping -A, nbtstat , nslookup without success. Other than those options, are there any alternatives? or there's no way to do it?

3 Answers 3


A quick search revealed to me this link. It suggests that you can use the net view command to view known computers

[\\computername [/CACHE] | [/ALL] | /DOMAIN[:domainname]]

NET VIEW displays a list of resources being shared on a computer. When used
without options, it displays a list of computers in the current domain or

\\computername             Is a computer whose shared resources you want
                           to view.
/DOMAIN:domainname         Specifies the domain for which you want to
                           view the available computers. If domainname is
                           omitted, displays all domains in the local area
/CACHE                     Displays the offline client caching settings for
                           the resources on the specified computer
/ALL                       Displays all the shares including the $ shares

I would suggest trying the following 3 commands.

  • and NET VIEW /ALL

You can use windows PsExec to get the host-name of remote machine as follow.

PsExec.exe \\Ip_address_of_remote_machine -u user_name_of_remote_machine -p password_of_remote_machine hostname

Note : Checked the same in my environment and it is listing the host name without any issues

  • Thanks, it's a good answer, but I doubt it'll work if the computer is offline/shutdown as I said in my OP
    – DARKGuy
    Nov 22, 2014 at 21:12

You can use the netsh command line to view all DHCP clients in a certain scope.

I am not sure if it allows regular users to do that. (didnt test it).

try this: Netsh dhcp server scope show clients

In this, the DHCP server is and the scope of leasing IPs is

This will show a list of all currently leased clients. you may need to filter the output for your IP address.

hopefully this helps.

EDIT: I just noticed that it shows only IP address leases, not the names. best option is to look at DHCP snap in in the MGM Console (if you have access).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .