Pritam Posted January 6, 2011 Share Posted January 6, 2011 (edited) I have a list of user IDs & I want to find the computer names on which the users are currently logged in. Is it possible???<br> Edited January 6, 2011 by Pritam Link to comment Share on other sites More sharing options...
spudw2k Posted January 6, 2011 Share Posted January 6, 2011 (edited) There are a few approaches that I can think of. If it is in a domain environment (and you are a domain admin) you should be able to examine an event log (which may take some time) to find the most recent login activity for a user and which machine they logged into. To further investigate you can use WMI to verify the current logged in user to a given machine. Alternatively you could just perform the WMI check on a bunch of machines (shotgun approach). There are examples of how to use WMI in AutoIt on this forum (search for Scriptomatic) and there are event log examples in the help file. You can also use utilities to speed up the event log process (Logparser). Edited January 6, 2011 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
indnracn2 Posted February 21, 2012 Share Posted February 21, 2012 Hello Pritam were you ever able to figure this problem out? I have a solution but I dont know how to automate it. On a domain you can net send the user then use nbtstat -c to show the cache and nslookup the ip. any idea how i can automate this. I can get to the nbstat - c but i have to figure out a way to output that to a file then read the txt file and extract the ip from that? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 21, 2012 Moderators Share Posted February 21, 2012 Probably the easiest way, if you have domain authority, is to create a simple "WhoLoggedOn" script and apply it via GroupPolicy. We run a simple script that captures UserName, Login Time, Authenticating DC, OS and ServicePack, Asset Tag and IP address and appends to a file on the network. Helpdesk technicians then use a log parser to check by UserName or Asset Tag. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
jazzyjeff Posted February 21, 2012 Share Posted February 21, 2012 We also create a log file when the users log in. Here is what part of the script looks like. $TITLE = ("Username,Computer Name,IP Address,Time,Date,BSSID,Room");, AP MAC Address") $Login = (@UserName & "," & @ComputerName & "," & @IPAddress1 & "," & @HOUR & ":" & @MIN & ":" & @SEC & "," & @MON & "/" & @MDAY & "/" & @YEAR & "," & $MAC & "," & $location) If FileReadLine("servernameshareStudents Log.csv", 1) = $TITLE Then FileWriteLine("servernameshareStudents Log.csv", $Login) Else FileWriteLine("servernameshareStudents Log.csv", $TITLE) FileWriteLine("servernameshareStudents Log.csv", $Login) EndIf Link to comment Share on other sites More sharing options...
MPHillier Posted February 22, 2012 Share Posted February 22, 2012 We use a Mysql database and an autoit script to push logon user name, computer name, Ip, date and time, and computer serial to the database. I have a front end VB6 program to retrieve information by various queries. By date, By month, by year, by computer name, by username and so on.... All free just had to built it.... I Break and Fix things... If the surf is up I'm outta here..... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now