Notification

Icon
Error

Last used system of users in a specific OU

Posted: Wednesday, October 28, 2020 12:32:21 PM(UTC)
chriscornelis

chriscornelis

Member Original PosterPosts: 2
1
Like
This issue has been solved! Click here to view the solution
Hello,

I am having issues creating a report.
What I would like is a report of the computers/systems used by users in a specific OU.
So far example a list of all the users in a specific AD OU with the last system they logged on to.

How can I create a report like this ?

Thank you

Chris
Brandon
#1Brandon Member Posts: 57  
posted: 10/28/2020 5:05:18 PM(UTC)
See if this gives you what you want. On the where line you will need to replace the name of your OU. Be sure to leave the percent signs. I also included an optional time where you can limit the logons listed in the query. This will shorten the query time. If you want all logons showed, you can just remove " tblCPlogoninfo.logontime > GetDate() - 5 And" This will also only show active assets.

Quote:
Select Top 1000000 tblAssets.AssetID,
tblCPlogoninfo.Username,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblCPlogoninfo.logontime,
tblADusers.OU
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblCPlogoninfo On tblAssets.AssetID = tblCPlogoninfo.AssetID
Inner Join tblADusers On tblCPlogoninfo.Username = tblADusers.Username
Where tblCPlogoninfo.logontime > GetDate() - 5 And tblADusers.OU Like '%bar%'
And tblAssetCustom.State = 1

chriscornelis
#2chriscornelis Member Original PosterPosts: 2  
posted: 10/29/2020 11:11:35 AM(UTC)
Thank you !

Active Discussions

Action Remote Uninstaller
by  miek_g   Go to last post Go to first unread
Last post: 10/28/2020 3:52:20 PM(UTC)
Action Setting Computer AD Description Attribute
by  DJSMC  
Go to last post Go to first unread
Last post: 10/27/2020 12:39:54 PM(UTC)
Action Open Teams/SfB Chat with user
by  marceman   Go to last post Go to first unread
Last post: 9/10/2020 4:10:18 PM(UTC)
Lansweeper Report showing app even after it has gone
by  TimHolmes1973  
Go to last post Go to first unread
Last post: 9/9/2020 11:50:17 PM(UTC)
Action Remote Device Manager
by  steveb   Go to last post Go to first unread
Last post: 9/4/2020 9:52:01 PM(UTC)
Action View Windows Defender detections remotely
by  steveb  
Go to last post Go to first unread
Last post: 9/4/2020 9:37:48 PM(UTC)
Lansweeper Filter Assets' groups by WinSystemLocale
by  Alex Beaumier   Go to last post Go to first unread
Last post: 8/20/2020 4:17:17 PM(UTC)
Action Chrome History
by  csys  
Go to last post Go to first unread
Last post: 8/14/2020 2:14:21 PM(UTC)