cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tesdahl
Engaged Sweeper
Am looking for help in showing what users are linked to pc/laptop assets. What tables are need to joing to provide a list of assets, with the users that have most recently logged on to those assets?

Thanks,

Steve
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
A sample report can be seen below. It lists user logons that occurred in the last 7 days. Replace the number marked in bold to change the time frame.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
tblCPlogoninfo.logontime,
tsysOS.Image As icon
From tblCPlogoninfo
Inner Join tblAssets On tblAssets.AssetID = tblCPlogoninfo.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblCPlogoninfo.logontime > GetDate() - 7
Order By tblAssets.Domain,
tblAssets.AssetName,
tblCPlogoninfo.logontime Desc

View solution in original post

3 REPLIES 3
Hemoco
Lansweeper Alumni
A sample report can be seen below. It lists user logons that occurred in the last 7 days. Replace the number marked in bold to change the time frame.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
tblCPlogoninfo.logontime,
tsysOS.Image As icon
From tblCPlogoninfo
Inner Join tblAssets On tblAssets.AssetID = tblCPlogoninfo.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblCPlogoninfo.logontime > GetDate() - 7
Order By tblAssets.Domain,
tblAssets.AssetName,
tblCPlogoninfo.logontime Desc
tesdahl
Engaged Sweeper
5.0.0.52
Hemoco
Lansweeper Alumni
Which Lansweeper version are you using? 4.2 or 5.0?