3 Replies Latest reply on Oct 28, 2019 2:37 PM by MaxStr

    How to see when user last logged on?

    MaxStr Enthusiast

      I'm trying to clean up some persistent VDI, and I need to see when was the last time the user logged in. Is this possible in the Horizon interface?

        • 1. Re: How to see when user last logged on?
          NxN_Slite Novice

          If the users as only access to VDI you could use the AD powershell query to find it.

           

          Get-ADUser -Identity “username” -Properties “LastLogonDate”

          (You could add some flavor to check all members of a group)

           

           

          you could also open the admin$ and check at timestamp of the user in the VMs

           

          You could also use Vcrop if you do have it. it does metric that.

           

          Finally you could query the Horizon View DB directly following this link

           

          VMware Knowledge Base

           

          Good luck and have a great day.

          1 person found this helpful
          • 2. Re: How to see when user last logged on?
            Amin Masoudifard Expert

            Execute the following query in the SQL management studio to retrieve information about last logged on users from VMware Horizon View Event database: 

             

            SELECT a.ModuleAndEventText,a.Time
            FROM event_historical a
            INNER JOIN
            (SELECT ModuleAndEventText,
            MAX(Time) as Time
            FROM event_historical
            GROUP BY ModuleAndEventText
            ) AS b
            ON a.ModuleAndEventText = b.ModuleAndEventText
            AND a.Time = b.Time
            WHERE EventType = 'Agent_CONNECTED';

            Please mark my comment as the Correct Answer if this solution resolved your problem
            • 3. Re: How to see when user last logged on?
              MaxStr Enthusiast

              Who keeps marking posts as answered after a few hours? Well obviously it's the mods, but I would have marked it myself.  You guys need to give it a few (week)days, some of us don't work on weekends