Hi Moto,
Some of those commands find things, other do not.
What I am really after is how does Windows Explorer do it.
-T
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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
Hi Moto,
Some of those commands find things, other do not.
What I am really after is how does Windows Explorer do it.
-T
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.
I forgot to change the subnet. It found two of the five, but never itself from W10 and W11. W7 does not respond to WDS, but showed up on Windows explorer as netbios but only on the W7 machine. Fedora 33 should be dead quiet. Samba server was always found (wsdd server).
See if this Powershell script works for you.
$MyNet = "192.168.1.*" # Your subnet
$neighbors = (Get-NetNeighbor -AddressFamily IPv4 | Where-Object {($_.IPAddress -like $MyNet) }).IPAddress
"{0} neighbors were found" -f $neighbors.count
$rpt = foreach ($ip in $neighbors) {
$name = Resolve-DnsName $ip -LlmnrNetbiosOnly -ErrorAction SilentlyContinue -QuickTimeout
if ($name) {
[PSCustomObject]@{
IP = $ip
Name = $name.namehost
}
}
}
$rpt
If you don't know of a command line tool and you don't know how Windows Explorer calls WDS, then please do not waste your time on alternate solutions. I do very much appreciate your help, but please do stay on subject.