create a report that shows when the last time an account was logged into that computer

create a report that shows when the last time an account was logged into that computer

I would like to create a report that tells show by OU what and when an account was logged into that computer. How do I do that?

P.S. I'm very new to Altiris. Thanks for any help in advance.

Hi there. I can help you

Hi there. I can help you with your report. Are you using the AD Import tool to bring your computers into Altiris? If so I can modify this to group it by OU for you. Right now this will show all computers who logged into them last and the most recent time that they logged in at.

select tag.name 'Computer Name', logonusr."display name" 'logged on by', max(logon."login time") 'last logged into date/time'
from vcomputer tag
join evt_aex_client_logon logon on tag.guid = logon._resourceguid
join inv_global_windows_users ad1 on logon."user" = ad1.userid
join vuser logonusr on ad1._resourceguid = logonusr.guid
group by tag.name, logonusr."display name"