Don't worry about being a newbie, we all are in regards to something. joe
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rimmerman, Russ Sent: Tuesday, June 22, 2004 9:22 AM To: '[EMAIL PROTECTED]' Subject: RE: [ActiveDir] Tracking the machine from which user logs in Oops, sorry for bein such a noobie :) Thanks Joe -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe Sent: Tuesday, June 22, 2004 7:37 AM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] Tracking the machine from which user logs in Watch for line breaks, things most likely ran together in the email and you didn't get separated back out properly.... In the first couple of lines it looks like the following ran together Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set IPConfigSet = objWMIService.ExecQuery ("Select MACAddress, IPAddress, ServiceName, Description, IPSubnet, DHCPEnabled, DHCPServer, DefaultIPGateway, WINSPrimaryServer, WINSSecondaryServer from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") Should be Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set IPConfigSet = objWMIService.ExecQuery ("Select MACAddress, IPAddress, ServiceName, Description, IPSubnet, DHCPEnabled, DHCPServer, DefaultIPGateway, WINSPrimaryServer, WINSSecondaryServer from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") And those are each both just supposed to be a single line. That is just one of my issues with vbscript is how it assumes eol for \n. I.E. It doesn't take a forced line break / terminator like perl or c/c++ or javascript does with a ;. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rimmerman, Russ Sent: Tuesday, June 22, 2004 8:18 AM To: '[EMAIL PROTECTED]' Subject: RE: [ActiveDir] Tracking the machine from which user logs in (4, 76) Microsoft VBScript compliation error: Expected end of statement -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grocott Lee BC GB Sent: Tuesday, June 22, 2004 4:38 AM To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] Tracking the machine from which user logs in I would say it's easy to get the IP information at logon using vbs and wmi: Start of VBScript: ------------------ On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set IPConfigSet = objWMIService.ExecQuery ("Select MACAddress, IPAddress, ServiceName, Description, IPSubnet, DHCPEnabled, DHCPServer, DefaultIPGateway, WINSPrimaryServer, WINSSecondaryServer from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") For Each IPConfig In IPConfigSet GetNetworkCardProperties(IPConfig) Next Function GetNetworkCardProperties(IPConfig) If Not IsNull(IPConfig.IPAddress) Then For i=LBound(IPConfig.IPAddress) To UBound(IPConfig.IPAddress) If IPAddress <> Ipconfig.IPAddress(i) Then Wscript.Echo "IPAddress", IPConfig.IPAddress(i) Wscript.Echo "MACAddress", IPConfig.MACAddress(i) Wscript.Echo "SubNetmask", IPConfig.IPSubnet(i) Wscript.Echo "ServiceName", IPConfig.ServiceName Wscript.Echo "Description", IPConfig.Description If IPConfig.DHCPEnabled < 0 Then IPDHCPEnabled = "TRUE" Elseif IPConfig.DHCPEnabled > 0 Then IPDHCPEnabled = "FALSE" End if Wscript.Echo "DHCPEnabled", IPDHCPEnabled Wscript.Echo "DHCPServer", IPConfig.DHCPServer Wscript.Echo "DefaultGateway", IPConfig.DefaultIPGateway(i) Wscript.Echo "WINSPrimary", IPConfig.WINSPrimaryServer Wscript.Echo "WINSSecondary", IPConfig.WINSSecondaryServer End If Next End If end function ------------------ End of VB Script :-) Does that help? Let me know if something's not clear. Cheers, Lee -----Original Message----- From: joe [mailto:[EMAIL PROTECTED] Sent: 21 June 2004 22:31 To: [EMAIL PROTECTED] Subject: RE: [ActiveDir] Tracking the machine from which user logs in Well it depends on good you want your data to be.... However the only real full proof way of doing this is to write a service that runs on each PC and watches what is going on. You have several different types of logons, network, interactive, service, etc. Someone could log onto an ID on a machine but never hit a logon script (cached cred logon or runas, etc). As for log offs... Well log offs are a slippery concept, if someone hibernates, did they log off? What if they just shut the PC off? joe -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mukul Joshi Sent: Sunday, June 06, 2004 2:55 AM To: ADList Subject: [ActiveDir] Tracking the machine from which user logs in Hi, I am writing an application that would track the login logoff activities of users. I can get lastlogin and lastlogoff information from AD, but I also need to know the machine/IP on which that particular login/logoff happened. How do I get this information? Thanks ~ Mukul List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This e-mail is confidential, may contain proprietary information of the Cooper Cameron Corporation and its operating Divisions and may be confidential or privileged. This e-mail should be read, copied, disseminated and/or used only by the addressee. If you have received this message in error please delete it, together with any attachments, from your system. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This e-mail is confidential, may contain proprietary information of the Cooper Cameron Corporation and its operating Divisions and may be confidential or privileged. This e-mail should be read, copied, disseminated and/or used only by the addressee. If you have received this message in error please delete it, together with any attachments, from your system. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/