Lansweeper will scan the last logged on user on a Windows computer
during the last scan. This means that it will only pick up the usernames whenever a user was logged on during one of the scans you have set up under Scanning\Scanning Targets.
Additionally, you can find a custom sample report below, which will give you the information you are after. Keep in mind that you will have to change what I have
highlighted below with the username of the user you want to search for. Instructions for adding this report to your Lansweeper installation can be found
here. If you are interested in building or modifying reports, we do recommend:
- Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
- Making use of our database dictionary, which explains in great detail what each database table and field stores. More information on the dictionary can be found here.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblCPlogoninfo.Domain,
tblCPlogoninfo.Username,
tblCPlogoninfo.logontime
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblCPlogoninfo On tblCPlogoninfo.AssetID = tblAssets.AssetID
Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblCPlogoninfo.Username Like '%
YourUser%' And tblCPlogoninfo.logontime >
GetDate() - 7 And tblState.Statename = 'Active'
Order By tblAssets.Domain,
tblAssets.AssetName
EDIT:
If wanted, you can also use this SQL Query which will provide you with a list of users that have logged in multiple computers during the scans in the last 7 days.
Select Distinct Top 1000000 tblCPlogoninfo.Domain + '/' +
tblCPlogoninfo.Username As DomUsers,
tblAssets.AssetID,
tblAssets.AssetName,
tblCPlogoninfo.Domain,
tblCPlogoninfo.Username
From tblCPlogoninfo
Left Join tblAssets On tblAssets.AssetID = tblCPlogoninfo.AssetID
Where tblCPlogoninfo.Domain + '/' + tblCPlogoninfo.Username In (Select
distinctLogOns.DomUser
From (Select Distinct tblCPlogoninfo.Domain + '/' + tblCPlogoninfo.Username As
DomUser,
tblCPlogoninfo.Domain,
tblCPlogoninfo.Username,
tblCPlogoninfo.AssetID
From tblCPlogoninfo
Where tblCPlogoninfo.logontime > GetDate() - 7) As distinctLogOns Group By
distinctLogOns.DomUser Having Count(distinctLogOns.DomUser) > 1)
Order By DomUsers