(tblAssetCustom.Warrantydate Is Not Null And tblAssetCustom. In order to make this report reliable we recommend scanning your computers with LsPush in a logon script. If a user logs on and off while the computer isn't being scanned, Lansweeper won't get to know this. If a user was logged on at a time when the computer. This table is being cleaned up according to your settings under Configuration\Server options, section History Cleanup Options (Delete logon information after X days). Note: User logons are only scanned if the user is logged on during scanning. Each time Lansweeper scans a computer, it makes an entry in tblCPlogoninfo if any user is currently logged on to the computer. Find who logged in where or works on which machine in no time. Using the built-in report below you can easily find the last logged in user for each computer. Lansweeper automatically scans logons when it performs a scan on a device. You just need to add this field to your report. Find the Last Logon of Users in Your Network. The last scanned user is always stored in ername. (tblAssetCustom.Warrantydate Is Not Null And tblAssetCustom.State = 1) Where (tblAssetCustom.PurchaseDate Is Not Null And tblAssetCustom.State = 1) Or Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID Select Top 1000000 tblAssetCustom.AssetID, Using LsPush with a GP on logon is the best way. If you want to accurately track logon times with Lansweeper. Using the built-in report below you can easily find the last logged in user for each computer. I am totally clueless on how to build proper SQL queries so I would appreciate anyone willing to revamp this if anyone is game. The Last Logon Lansweeper reports on is user that was last logged in during a scan, the login time simply reflects when the scan took place. These errors can be used to both discover and resolve issues on your computers, preventing downtime. Additionally, you can enable scanning other event log information. Select Top 1000000 SubQuery.Username, SubQuery.Domain As Userdomain, SubQuery.LastLogon, tblAssets.AssetName, tblAssets. My problem is this file has multiple entries for each asset name based on the last login time and date so a simple join command does not give me what I need. By default, Lansweeper will scan all the error events generated by the Windows computer. It appear the data I want is in tblCPlogoninfo.Username. Basically we want to identify users that are using computers that they shouldn't.īy the way, I tried your query but gives me the following error:Įrror while saving report: "The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expression, unless TOP, OFFSET or FOR XML is also specified.I am trying to add the most recent user to the following report for each asset name. Select Distinct Top 1000000 tblAssets.AssetID, tblAssets.AssetName, tblAssets.Username, tsysAssetTypes. I need to find a way to limit this to show just the last log on event. Hi, thank you for taking the time one reading this, I would like to get the last 5 logins per user regardless of the computer (can be 5 times the same computer if the user only uses 1 computer or 5 different computers if the user normally logs in everywhere). I have a report that lists the systems that have not logged on in the last 30 days. SELECT UserName, LogOnTime, AssetId, AssetName INNER JOIN tblCPLogOnInfo AS l ON a.AssetId = l.AssetId SELECT l.UserName, l.LogOnTime, a.AssetId, a.AssetName, ROW_NUMBER() OVER (PARTITION BY l.UserName ORDER BY l.LogOnTime DESC) AS RowNum To get the last 5 logon times per user you would run something like this. You could mean last 5 assets they logged into regardless of when, or you could mean the last 5 logontimes regardless of asset. Well, depends what you mean by last 5 logins per user.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |