Alan's Blog

"Yeah. I wrote a script that will do that."

Locate User

Posted on June 4th, 2009

If you are using NetBIOS over TCP, you can find the computer a user is logged onto with the command:

nbtstat –a username

That method is not effective for finding multiple sessions, nor does it work when you finally stop using NetBIOS.  xFinger.vbs, by Gurgen Alaverdian was written with the interesting idea that you can find a user based on their session to the home directory server.  My version of xfinger.vbs adds a prompt for the user name, resolution of IP to Name, and a WMI double check to see if user is logged onto the PC.  Unlike nbtstat, you need to have admin rights on the home directory server for this to work.

Update: 4/13/12 adds the ability to copy the data to the clipboard using MS Word.  Make sure you have opened Word at least one time with the permissions you are using before trying to run the script.

Filed under Alan's Favorites, Scripting, VbScript, Windows Administration |

Leave a Reply

You must be logged in to post a comment.

Please Note

All the scripts are saved as .txt files. Newer files have a "View Script" button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use "Save Target As". Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with Version 3 or 4.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient. It is pretty easy to figure out my email address from the scripts, and you are welcome to contact me that way.

Site Search



SQL Site

Bad Behavior has blocked 262 access attempts in the last 7 days.