08-08-2014 12:41 PM
Solved! Go to Solution.
08-18-2014 05:27 PM
Use the reports below instead. We only listed logon events that occurred on computers that meet the criteria you specified: “The Report may list only computers where the Name contains "wks" or "lap" and the manufaturer is either Lenovo or Dell.”
To avoid confusion in the future, please do not refer to user logons as user “relations”, as this is what threw off our support staff. Lansweeper has a specific “relation” feature that allows you to manually link assets to other assets or users. When you asked for your report(s), we assumed this was what you were referring to. You are talking about user logons however, which have nothing to do with user “relations”.
Users, last computer users logged into and computer’s software
Select Top 1000000 SubQuery.Username,
SubQuery.Domain As Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Displayname,
tblADusers.Department,
tblADusers.Company,
tblADusers.email,
SubQuery1.logontime,
SubQuery1.AssetID,
SubQuery1.AssetName,
SubQuery1.Domain,
SubQuery1.IPAddress,
SubQuery1.Manufacturer,
SubQuery1.Model,
SubQuery1.[Authorization],
SubQuery1.softwareName,
SubQuery1.softwareVersion,
SubQuery1.SoftwarePublisher
From (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain,
Max(tblCPlogoninfo.logontime) As LastLogon
From tblCPlogoninfo
Group By tblCPlogoninfo.Username,
tblCPlogoninfo.Domain) SubQuery
Left Join tblADusers On tblADusers.Username = SubQuery.Username And
tblADusers.Userdomain = SubQuery.Domain
Left Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
tblCPlogoninfo.logontime,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
Case tblSoftwareUni.Approved When 0 Then 'unrated' When 1 Then 'approved'
When 2 Then 'not approved' End As [Authorization],
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblSoftwareUni.SoftwarePublisher
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Inner Join tblCPlogoninfo On tblAssets.AssetID = tblCPlogoninfo.AssetID
Where (tblAssets.AssetName Like '%wks%' Or tblAssets.AssetName Like '%lap%') And
(tblAssetCustom.Manufacturer Like '%lenovo%' Or tblAssetCustom.Manufacturer Like
'%dell%')) SubQuery1 On SubQuery1.Username = SubQuery.Username
And SubQuery1.Userdomain = SubQuery.Domain And SubQuery1.logontime =
SubQuery.LastLogon
Order By Userdomain,
SubQuery.Username,
SubQuery1.[Authorization],
SubQuery1.softwareName
Users, all computers users logged into and computers’ software
Select Top 1000000 SubQuery1.Username,
SubQuery1.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Displayname,
tblADusers.Department,
tblADusers.Company,
tblADusers.email,
SubQuery1.logontime,
SubQuery1.AssetID,
SubQuery1.AssetName,
SubQuery1.Domain,
SubQuery1.IPAddress,
SubQuery1.Manufacturer,
SubQuery1.Model,
SubQuery1.[Authorization],
SubQuery1.softwareName,
SubQuery1.softwareVersion,
SubQuery1.SoftwarePublisher
From tblADusers
Inner Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
tblCPlogoninfo.logontime,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
Case tblSoftwareUni.Approved When 0 Then 'unrated' When 1 Then 'approved'
When 2 Then 'not approved' End As [Authorization],
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblSoftwareUni.SoftwarePublisher
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Inner Join tblCPlogoninfo On tblAssets.AssetID = tblCPlogoninfo.AssetID
Where (tblAssets.AssetName Like '%wks%' Or tblAssets.AssetName Like '%lap%') And
(tblAssetCustom.Manufacturer Like '%lenovo%' Or tblAssetCustom.Manufacturer Like
'%dell%')) SubQuery1 On SubQuery1.Username = tblADusers.Username
And SubQuery1.Userdomain = tblADusers.Userdomain
Order By SubQuery1.Userdomain,
SubQuery1.Username,
SubQuery1.logontime Desc,
SubQuery1.[Authorization],
SubQuery1.softwareName
08-19-2014 10:35 AM
= 'lsch_dom00'
08-18-2014 08:40 PM
08-18-2014 05:27 PM
Use the reports below instead. We only listed logon events that occurred on computers that meet the criteria you specified: “The Report may list only computers where the Name contains "wks" or "lap" and the manufaturer is either Lenovo or Dell.”
To avoid confusion in the future, please do not refer to user logons as user “relations”, as this is what threw off our support staff. Lansweeper has a specific “relation” feature that allows you to manually link assets to other assets or users. When you asked for your report(s), we assumed this was what you were referring to. You are talking about user logons however, which have nothing to do with user “relations”.
Users, last computer users logged into and computer’s software
Select Top 1000000 SubQuery.Username,
SubQuery.Domain As Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Displayname,
tblADusers.Department,
tblADusers.Company,
tblADusers.email,
SubQuery1.logontime,
SubQuery1.AssetID,
SubQuery1.AssetName,
SubQuery1.Domain,
SubQuery1.IPAddress,
SubQuery1.Manufacturer,
SubQuery1.Model,
SubQuery1.[Authorization],
SubQuery1.softwareName,
SubQuery1.softwareVersion,
SubQuery1.SoftwarePublisher
From (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain,
Max(tblCPlogoninfo.logontime) As LastLogon
From tblCPlogoninfo
Group By tblCPlogoninfo.Username,
tblCPlogoninfo.Domain) SubQuery
Left Join tblADusers On tblADusers.Username = SubQuery.Username And
tblADusers.Userdomain = SubQuery.Domain
Left Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
tblCPlogoninfo.logontime,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
Case tblSoftwareUni.Approved When 0 Then 'unrated' When 1 Then 'approved'
When 2 Then 'not approved' End As [Authorization],
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblSoftwareUni.SoftwarePublisher
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Inner Join tblCPlogoninfo On tblAssets.AssetID = tblCPlogoninfo.AssetID
Where (tblAssets.AssetName Like '%wks%' Or tblAssets.AssetName Like '%lap%') And
(tblAssetCustom.Manufacturer Like '%lenovo%' Or tblAssetCustom.Manufacturer Like
'%dell%')) SubQuery1 On SubQuery1.Username = SubQuery.Username
And SubQuery1.Userdomain = SubQuery.Domain And SubQuery1.logontime =
SubQuery.LastLogon
Order By Userdomain,
SubQuery.Username,
SubQuery1.[Authorization],
SubQuery1.softwareName
Users, all computers users logged into and computers’ software
Select Top 1000000 SubQuery1.Username,
SubQuery1.Userdomain,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.Displayname,
tblADusers.Department,
tblADusers.Company,
tblADusers.email,
SubQuery1.logontime,
SubQuery1.AssetID,
SubQuery1.AssetName,
SubQuery1.Domain,
SubQuery1.IPAddress,
SubQuery1.Manufacturer,
SubQuery1.Model,
SubQuery1.[Authorization],
SubQuery1.softwareName,
SubQuery1.softwareVersion,
SubQuery1.SoftwarePublisher
From tblADusers
Inner Join (Select Top 1000000 tblCPlogoninfo.Username,
tblCPlogoninfo.Domain As Userdomain,
tblCPlogoninfo.logontime,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
Case tblSoftwareUni.Approved When 0 Then 'unrated' When 1 Then 'approved'
When 2 Then 'not approved' End As [Authorization],
tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblSoftwareUni.SoftwarePublisher
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Inner Join tblCPlogoninfo On tblAssets.AssetID = tblCPlogoninfo.AssetID
Where (tblAssets.AssetName Like '%wks%' Or tblAssets.AssetName Like '%lap%') And
(tblAssetCustom.Manufacturer Like '%lenovo%' Or tblAssetCustom.Manufacturer Like
'%dell%')) SubQuery1 On SubQuery1.Username = tblADusers.Username
And SubQuery1.Userdomain = tblADusers.Userdomain
Order By SubQuery1.Userdomain,
SubQuery1.Username,
SubQuery1.logontime Desc,
SubQuery1.[Authorization],
SubQuery1.softwareName
08-11-2014 04:39 PM
08-08-2014 09:02 PM
08-08-2014 02:02 PM
08-08-2014 01:33 PM
08-08-2014 01:14 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now