CLI: How can I get an IP address from a CIFS NETBIOS name?

Todd Chester 646 Reputation points
2021-10-15T19:54:40.62+00:00

Hi All,

Windows 10, pro and home

In Windows Explorer (not IE), when I click on Network in the left column, I get a list of computer CIFS broadcast names in the right pane. Well, after a bit.

I know how to add the IP column in Windows explorer, but ..

Is there a way to translate CIFS NETBIOS broadcast names into IP addresses from the command line?

Many thanks,
-T

Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,266 questions
0 comments No comments
{count} votes

12 answers

Sort by: Most helpful
  1. MotoX80 31,556 Reputation points
    2021-10-17T00:54:49.953+00:00

    I brought up a Win10 test VM and changed the NIC from DHCP to use a hardcoded IP address that had no DNS entry. I pinged the machine and got back an IPV6 address. I removed IPV6 from the network on the VM and then ping was able to see the IPV4 address.

    I just tried it again and ping failed. But the Windows Explorer also failed. On the VM I tried to use the Windows Explorer to see what it saw in the Network folder and it reported that network discovery was not started. I ran my PS script from the below link and rebooted.

    https://learn.microsoft.com/en-us/answers/questions/302088/how-to-switch-from-a-call-by-ip-address-to-a-call.html

    Both Ping and Explorer now work.

    This site says that ping uses the Netbios name.

    https://www.cbfive.com/ping-vs-nslookup/

    If ping fails for you, does Explorer still work?

    1 person found this answer helpful.

  2. MotoX80 31,556 Reputation points
    2021-10-16T12:32:22.683+00:00

    How about a good old ping?

    ping -n 1 test10
    

    If you are looking to write code use Powershell.

    (Test-NetConnection test10).RemoteAddress.IPAddressToString
    

  3. MotoX80 31,556 Reputation points
    2021-10-17T02:00:55.693+00:00

    except for the home edition,

    I'm running Win10 Home 2H1 and I can add the IP address column.

    141039-capture.jpg

    Check your network settings on both machines to see if Netbios is enabled.

    141040-capture1.jpg


  4. Todd Chester 646 Reputation points
    2021-10-21T23:00:18.363+00:00

    The local network computer are not in DNS.

    There are two problems

    1) folks naming their workstations the same name as the server

    2) the add columns on a few computers is missing half the view section. So I never know when I can use Windows Explorer to find IP's.

    So I am looking for a command line way to do a WDS lookup. I can write it myself if I can find the correct api call.

    0 comments No comments

  5. MotoX80 31,556 Reputation points
    2021-10-21T23:30:19.877+00:00

    The local network computer are not in DNS.

    Why not? Is there some network limitation? Who "owns" the network? Is this a home environment? A business environment?

    1) folks naming their workstations the same name as the server

    Who "owns" the desktop support? If you have a business environment, then end users should not get to pick their own workstation name. And it certainly should not be the same name as the server. What kind of server is this? Are you using Windows Server Essentials? What about Active Directory? Who supports/owns DNS?

    the add columns on a few computers is missing half the view section. So I never know when I can use Windows Explorer to find IP's.

    If you need to get IP's, then all machines should be registered in DNS. That's what it's there for.

    So I am looking for a command line way to do a WDS lookup. I can write it myself if I can find the correct api call.

    No, this is an XY problem.

    0 comments No comments