0

I'm trying to find out how to lookup the HostName of a computer over IP using Command Prompt, however I don't need the registered DNS name. I'm attempting to do an IP/DNS Database Cleanup so finding the DNS Name would be redundant. Is there a way to find the Physical Name of a computer via IP?

Example: Someone images a computer with the name Office-F2-A2 (Unknown to me) The DNS Server is registered with the name Office-F1-A1.example.com

ping -a, nslookup, nbtstat -a (or any variable) seems to only give me the DNS Name.

Are there any other commands for this?

0
wmic /node:"n.n.n.n" os get csname
0

Just use nbtstat -A ipaddress and review the results. Find the NETBIOS table. Locate a row where the type is "UNIQUE" and find the hostname of the computer in the "Name" column for that row.

nbtstan can't return DNS name, only NetBIOS name. Of course you can use multi hostnames by edit a registry if you want. Check another NetBIOS name in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters section of the Windows registry into the OptionalNames string value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.