Client Management Suite

 View Only
  • 1.  How can I find the username last login to machine

    Posted Apr 28, 2016 12:03 PM

    I have some general user they use same account name, I need to find out when is their last login to machine date and time.

    where is the table in Altiris database.

     I need to query username, machine name. last login date and time

     

    Thanks

     

     

    Lillian



  • 2.  RE: How can I find the username last login to machine

    Posted Apr 28, 2016 08:30 PM

    Here ya go, try this...

    --Michael Civitillo
    --Real Time User Activity

    SELECT
    cid.[Name] Computer, 
    (lo1.Domain + '\' + lo1.[User]) [User], 
    lo1.[Event], 
    lo1._eventTime [Event Time] 


    FROM 
    Evt_AeX_Client_LogOn lo1 
        join Inv_AeX_AC_Identification cid 
            on cid._ResourceGuid = lo1._ResourceGuid

    WHERE exists

    (
        select _ResourceGuid, _eventTime 
        from
        (
            select lo2._ResourceGuid, max(lo2._eventTime) _eventTime
            from Evt_AeX_Client_LogOn lo2
            group by lo2._ResourceGuid, lo2.[Event]
        ) lo3
        where lo1._ResourceGuid = lo3._ResourceGuid 
            and    lo1._eventTime = lo3._eventTime
    )

    ORDER BY  
    [Event Time] desc



  • 3.  RE: How can I find the username last login to machine

    Posted Apr 28, 2016 08:43 PM

    Michael,

     

        This is good, I use your query, it work, I got what I need, thank you so so much

     

     

    Best Regard

     

    Lillian



  • 4.  RE: How can I find the username last login to machine

    Posted Apr 29, 2016 11:58 AM

    No problem Lillian, happy to help!