You can type:
NBTSTAT -c
and receive a display similar to:
Node IpAddress: [0.0.0.0] Scope Id: []
NetBIOS Remote Cache Name Table
Name Type Host Address Life [sec]
------------------------------------------------------------
GREYSTONE UNIQUE 192.168.1.30 010
If the user is not listed, type:
net send jennifer hello
NBTSTAT -c
Node IpAddress: [0.0.0.0] Scope Id: []
NetBIOS Remote Cache Name Table
Name Type Host Address Life [sec]
------------------------------------------------------------
JENNIFER UNIQUE 192.168.1.20 001
GREYSTONE UNIQUE 192.168.1.30 013
If you need to do this in a batch job,
call WhatIP UserName. It will return the
whatip environment variable with the IP address,
or a
0 if the user is not found.
Example:
call whatip Jennifer
if "%whatip%"
"" goto syntax
set userv=%1
set userv=%userv:"=%
:again
nbtstat -c|find /i "%userv%" > %temp%\where.log
for /f "Tokens=1-7* Delims=. " %%i in (%temp%\where.log) do call :parse "%%i" "%%j" "%%k" "%%l" "%%m" "%%n" "%%o"
if "%whatip%"
"%userv%" goto donbt
if /i not %2
"0" goto end
net send "%userv%" Ignore this interruption
set whatip=0
goto again
:end
You could try using NTNAME instead of NET SEND.