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,272 questions
0 comments No comments
{count} votes

12 answers

Sort by: Most helpful
  1. MotoX80 31,581 Reputation points
    2021-10-23T00:03:20.667+00:00

    but never itself

    The pc that you're running it on isn't "in the neighborhood" so to speak. Just use ipconfig or this PS command to get the IP.

    (get-netipconfiguration).ipv4address.ipaddress
    

    For netbios, try running nbtstat.

    C:\Temp>nbtstat
    
    Displays protocol statistics and current TCP/IP connections using NBT
    (NetBIOS over TCP/IP).
    
    NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n]
            [-r] [-R] [-RR] [-s] [-S] [interval] ]
    
      -a   (adapter status) Lists the remote machine's name table given its name
      -A   (Adapter status) Lists the remote machine's name table given its
                            IP address.
      -c   (cache)          Lists NBT's cache of remote [machine] names and their IP addresses
      -n   (names)          Lists local NetBIOS names.
      -r   (resolved)       Lists names resolved by broadcast and via WINS
      -R   (Reload)         Purges and reloads the remote cache name table
      -S   (Sessions)       Lists sessions table with the destination IP addresses
      -s   (sessions)       Lists sessions table converting destination IP
                            addresses to computer NETBIOS names.
      -RR  (ReleaseRefresh) Sends Name Release packets to WINS and then, starts Refresh
    
      RemoteName   Remote host machine name.
      IP address   Dotted decimal representation of the IP address.
      interval     Redisplays selected statistics, pausing interval seconds
                   between each display. Press Ctrl+C to stop redisplaying
                   statistics.
    
    0 comments No comments

  2. Todd Chester 646 Reputation points
    2021-10-24T00:24:50.333+00:00

    Hi Moto,

    Some of those commands find things, other do not.

    What I am really after is how does Windows Explorer do it.

    -T