→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
FriendlyGuy
Engaged Sweeper II

Hello,

i'm trying to make a Report that shows me the Members of an AD Group and their last logged on Computer.

I've found some Reports and mine is almost done. But two things I cant get to work.

1. I want the UserName to be clickable

2. It should only show the last logged on Computer and not the last 2,3

 

Can someone help me?

Thanks.

 

My Report:

 

Select Top 100000 tblADusers.Displayname,
  tblADusers.Username,
  tblAssets.AssetName,
  tblAssets.AssetID,
  tblADComputers.Description,
  tLastLogon.[last logon]
From tblADusers
  Left Join (Select tblCPlogoninfo.AssetID,
      Max(tblCPlogoninfo.logontime) As [last logon],
      tblCPlogoninfo.Username,
      tblCPlogoninfo.Domain
    From tblCPlogoninfo
    Group By tblCPlogoninfo.AssetID,
      tblCPlogoninfo.Username,
      tblCPlogoninfo.Domain) tLastLogon On tLastLogon.Username =
      tblADusers.Username And tLastLogon.Domain = tblADusers.Userdomain
  Left Join tblAssets On tLastLogon.AssetID = tblAssets.AssetID
  Inner Join tblADMembership On
      tblADusers.ADObjectID = tblADMembership.ChildAdObjectID
  Inner Join tblADGroups On tblADMembership.ParentAdObjectID =
      tblADGroups.ADObjectID
  Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblADGroups.Name Like 'xxxxx'
Order By tblADusers.Displayname,
  tLastLogon.[last logon] Desc

 

0 REPLIES 0