Kwatog Tech Notes
perpetual newbie, forever learner
Get Machine Name on Windows
Published 2015-10-07
More often than not, IP address is enough for me to work on things. However, there are times when the system configurations require the machine name/hostname or the security team needs both IP Address and IP Name(or hostname). The funny thing is I always forget the commands. Okay, I usually use nslookup but that is only applicable if the IP is available in the DNS. If not, tough luck. Anyway, here are the commands.
Query IP in the DNS
- fire up command console (cmd.exe)
- type in
nslookup 192.168.1.1
- get the name from the output
Query IP without DNS/h3>
- fire up command console (cmd.exe)
- type in
nbtstat -A 192.168.1.1
- the name of UNIQUE entry is the hostname
`
Of course, 192.168.1.1 is the IP address. It goes without saying that you have to change it to the IP address are querying for.`