cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
akaspar
Engaged Sweeper
Hi, I was looking for a post about LastLogon User's OU relation with the ADComputers OU, but could find anything. We are looking to gather a report for the (LastUser + LastUser OU) Grouping it + (AssetComputer + ADComputer OU) Grouping it. So the report basically should display the ADLastUser and its OU + ADComputer the user last time connected and its ADComputer OU.

Thank you...
1 REPLY 1
akaspar
Engaged Sweeper
Built this query, but any other suggestion is welcome'd.


Select Top 1000000 tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tblADusers.Displayname, tblAssets.Username) As Displayname,
tblAssets.Lastseen,
tblAssets.AssetID,
tblAssets.AssetName,
tblADusers.OU,
tblADComputers.OU As OU1
From tblAssets
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Outer Join tblADusers On tblAssets.Userdomain = tblADusers.Userdomain And
tblAssets.Username = tblADusers.Username
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Order By tblAssets.Lastseen Desc

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now