
Solved!
Go to SolutionW
workingmind
80 Posts
0
1243
August 30th, 2011 11:00
Report for user logins
I am creating a report for user login history. I am using following query to find login times for a specific user for last 24 hours(query from sample reports).
SELECT DISTINCT CurrentUser, VirtualMachineName,LastTimeLoggedIn
FROM VirtualMachinesHistory
WHERE CurrentUser IS NOT NULL
AND DATEDIFF(hh,LastTimeLoggedIn,getDate()) < 24
AND CurrentUser = 'ABC\test.user'
ORDER BY CurrentUser
I need to also show the login details of the user on Terminal Services based desktops. As per document it can be found in view RemoteDesktopLog/RemoteDesktopLoghistory. I am not able to find column currentuser in these table to filter the records. Do I need to filter on the basis of 'MessageText' Column?. Is there any table from which I can get login details of the user (Terminal Based desk logins)
Thanks
Responses (1)
Solutions (0)

DELL-David Y
228 Posts
285
1
Posted August 30th, 2011 13:00
Hello Mohit,
You are correct, there is no CurrentUser column in either the RemoteDesktopLogHistory or RemoteDesktopLogRealtime views. If you are looking to get information regarding the user logins from the past 24 hours then I would suggest you do filter the MessageText column for LaunchRequests where the host type is RDSH.
Regards
David