cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pjbate
Engaged Sweeper III
Hi there, I have been asked to look into why the user record in lansweeper does not show all the log ons. I have run lsclient on log on and log off for our systems so that I can capture all records. I was mucking around with this SQL script on the database:
SELECT TOP (50) dbo.tblComputers.Computername, dbo.tblComputers.ComputerUnique, dbo.tblCPlogoninfo.Username, dbo.tblCPlogoninfo.Ipaddress,
dbo.tblCPlogoninfo.logontime
FROM dbo.tblComputers INNER JOIN
dbo.tblCPlogoninfo ON dbo.tblComputers.Computername = dbo.tblCPlogoninfo.Computername
WHERE (dbo.tblCPlogoninfo.Username = N'a_pbg00121')
ORDER BY dbo.tblCPlogoninfo.logontime DESC


And noticed that when I checked the results with the Computers Logged Onto list they don't quite match. Is there something I've missed here?

ta,
Peter
2 REPLIES 2
pjbate
Engaged Sweeper III
Great, thanks for the script 🙂

Peter
Hemoco
Lansweeper Alumni
The specified report only shows the 50 most recent logons for the selected user. To find all computers a user logged into, you should use the report below. Replace "YourUser" with the user you want to report on.

Also note that user logon info is purged periodically based on your Scanning & Cleanup Options. These settings can be found in the Lansweeper configuration console under Scanning Servers\Your Server\Options.

Select Distinct tblCPlogoninfo.Username, tblComputers.Computername,
tblComputers.ComputerUnique
From tblComputers Inner Join
tblCPlogoninfo On tblComputers.Computername = tblCPlogoninfo.Computername
Where tblCPlogoninfo.Username = 'YourUser'
Order By tblComputers.ComputerUnique

New to Lansweeper?

Try Lansweeper For Free

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

Try Now