|
SystemTools ToolBoard
![]() How Do I ... ?
![]() Get and IP Address from a Username
|
| next newest topic | next oldest topic |
| Author | Topic: Get and IP Address from a Username |
|
Dbunt Junior Member |
Hi all, Apolgies if this has already been asked... Is there anyway, using a person's AD username, get the IP address they have been assigned and/or workstation name of the computer they are on... Regards Dbunt IP: Logged |
|
cmccullough Administrator |
You typically have to get this from the computer side, rather that from the user. You can select your computers in Hyena's right window, then right-click and choose View Logged on Users. When that is finished you can use the Copy to Clipboard option and paste into Excel. Then refer to that spreadsheet whenever you need to find a user. IP: Logged |
|
Dbunt Junior Member |
Hi, thanks for the reply. I do know about the option to see who is on a specific computer - the reason for my question is I am in a business where user's logon to different computers, and we use VNC to remote control them for troubleshooting, a lot of the time the user does not know their computer name and/or ip address. Regards, Dbunt IP: Logged |
|
Trammel Member |
Actualy I have a tool that can do what your asking. It is not 100% solid as net send's can fail for many reasons. First thing you could ask the user is to type %computername% in the Run line and ask them what the popup says. It should say something like "Windows can not find (users machine name). This will give you the name of their computer without having to walk a user through allot of right clicks and such. Please note that I used this tool from a share point on the net work. My command was called "Find Users Computer" The command was \\servername\Scripts\HyenaTools\Scripts\whereisuser.bat %E% Batch file: NET SEND %1 "HelpDesk is looking for your computer -- Just Click OK" ECHO Username = %1 PAUSE I have a couple of other find user files that also work. I will past the code for each file in italics. finduser.js var oShell = new ActiveXObject("WScript.Shell"); oShell.Exec("net send "+ oArgs(0) + " \"\""); WScript.Sleep(500); // It takes some time before the NetBIOS cache displays the name var UserLine = Cache.slice( Cache.indexOf( User ) ); var UserIP = UserLine.slice(37 , 52).replace(/\s/g,""); var RemoteCache = oShell.Exec( "nbtstat -a " + UserIP ).StdOut.ReadAll().replace(/\r/g,""); WScript.Echo(
Dim WshShell : Set WshShell = WScript.CreateObject("WScript.Shell")
If IsNull(strUserName) OR strUserName = "" Then WScript.Quit OutputFilePath = "c:\ip1.txt" ' Flush the cache On Error Resume Next Dim objFile : Set objFile = fso.OpenTextFile(OutputFilePath, ForReading) ' Nobody home WshShell.Run ("cmd /c nbtstat.exe -A " & strIPAddress & " > " & OutputFilePath) Set objFile = fso.OpenTextFile(OutputFilePath, ForReading) Do While objFile.AtEndOfStream <> True objFile.Close ' when running nbtstat, these are the codes [This message has been edited by Trammel (edited 09-13-2006).] IP: Logged |
All times are ET (US) | next newest topic | next oldest topic |
![]() |
|
Copyright � 2001 - 2006 SystemTools Software, Inc.
Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.46