Jetzt Ausprobieren

Last User Logon

Active Directory Local Users Users

Find the Last Logon of Users in Your Network

Lansweeper automatically scans logons when it performs a scan on a device. Using the built-in report below you can easily find the last logged in user for each computer. Find who logged in where or works on which machine in no time. Last logon detected during scanning, per user

Last Logon Detected During Scanning, per User Query

Select Top 1000000 UserInfo.Username,
  UserInfo.Domain As Userdomain,
  UserInfo.LastLogon As UserLastLogon,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tblAssets.Domain,
  tblAssets.IPAddress,
  tsysIPLocations.IPLocation,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tsysOS.OSname As OS,
  tblAssets.SP,
  tblAssets.Lastseen,
  tblAssets.Lasttried
From tblAssets
  Inner Join tblCPlogoninfo On tblAssets.AssetID = tblCPlogoninfo.AssetID
  Inner Join (Select Top 1000000 tblCPlogoninfo.Username,
        tblCPlogoninfo.Domain,
        Max(tblCPlogoninfo.logontime) As LastLogon
      From tblCPlogoninfo
        Inner Join tblAssetCustom On tblAssetCustom.AssetID =
          tblCPlogoninfo.AssetID
        Inner Join tblState On tblState.State = tblAssetCustom.State
      Where tblState.Statename = 'Active'
      Group By tblCPlogoninfo.Username,
        tblCPlogoninfo.Domain) As UserInfo On tblCPlogoninfo.Domain =
    UserInfo.Domain And tblCPlogoninfo.logontime = UserInfo.LastLogon And
    tblCPlogoninfo.Username = UserInfo.Username
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tsysIPLocations On tsysIPLocations.LocationID =
    tblAssets.LocationID
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tblState On tblState.State = tblAssetCustom.State
  Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblState.Statename = 'Active'
Order By Userdomain,
  UserInfo.Username

Show

Hide