|
Question : Finding the NetBIOS computer name for a given username
|
|
I am looking for a way, either using an external program, or as part of a vbscript, to take a username and find out the NetBIOS name of the computer that the user is logged on to. I know that one can use "nbtstat" to determine what user is logged on to a given computer, but I'd like to do it the other way around, preferably without having to poll every machine on the network.
I understand that the "net send" command can take a username as the destination and somehow it finds its way to the computer to which the given user is logged on. What would be extremely helpful is either an idea for how to code this sort of function in vbscript, or even if someone knows of a program that can do this task. If there is a program that does this, then I could just save its output as a textfile and use it in the script I am writing. If you need any more info, don't hesitate to ask! Thanks :-)
|
Answer : Finding the NetBIOS computer name for a given username
|
|
oh boy, here goes, write it out in a script or do it out, but if this doesnt satisfy you then i dont know, 'net view > people.txt' open file do a find/replace, find '\\' replace with 'nbtstat -a ' boom. save change 'people.txt' to 'people.bat'. run it in a prompt 'people.bat > computer.txt' and do a find on the user name within that file and walla you find the computer name by user.
|
|
|
|