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

Installer Cmd - WSUS Offline Update installation
by  jadeesh   Go to last post Go to first unread
Last post: 11/12/2020 9:07:11 AM(UTC)
Installer Deploy SolarWinds Take Control Agent
by  Corey Lambert  
Go to last post Go to first unread
Last post: 8/6/2020 2:23:22 PM(UTC)
Installer Microsoft Edge (Chromium) 84.0.522.44
by  PLSJohnJohn  
Go to last post Go to first unread
Last post: 7/24/2020 10:22:19 PM(UTC)
Installer Windows 10 Upgrade
by  CyberCitizen   Go to last post Go to first unread
Last post: 7/8/2020 1:07:47 AM(UTC)
Installer Installer - Microsoft Office
by  Florian_Eigsi  
Go to last post Go to first unread
Last post: 6/29/2020 3:33:20 PM(UTC)
Installer Firefox ESR 68.8.0 MSI Installer
by  PLSJohnJohn   Go to last post Go to first unread
Last post: 5/11/2020 4:33:50 PM(UTC)
Installer Update Chrome browser with GoogleUpdate.exe ?
by  Inna Ptushkina  
Go to last post Go to first unread
Last post: 5/4/2020 8:39:29 PM(UTC)