Saturday, May 15, 2021

VMware Horizon – Get user login date

Here’s a nice SQL query to get users login to your VDIs:

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';

No comments:

Post a Comment