Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2021 02:10 PM
Need help modifying the lsagent not seen in 7 days report to show only active devices. Any help is always appreciated.
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2021 06:17 PM
This should work.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Asset Name],
tblLsAgentGroup.Name As [LsAgent Group],
tblAssets.LastLsAgent As [Last LsAgent Scan],
tblAssets.LsAgentVersion,
tblLsAgentAssetState.statename As Status,
tblAssets.Domain,
tblAssets.Username,
tblAssets.IPAddress As [Last known IP],
tsysOS.OSname As OS,
tblAssets.SP As [Service Pack],
tblAssets.Description
From tblAssets
Inner Join tblLsAgentAsset On tblLsAgentAsset.AssetID = tblAssets.AssetID
Inner Join tblLsAgentAssetState On tblLsAgentAssetState.id =
tblLsAgentAsset.Status
Inner Join tblLsAgentGroup On tblLsAgentGroup.LsAgentGroupID =
tblLsAgentAsset.LsAgentGroupID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join lansweeperdb.dbo.tblAssetCustom On tblAssets.AssetID =
tblAssetCustom.AssetID
Where tblAssets.LastLsAgent < GetDate() - 7 And tblAssetCustom.State = 1
Order By [Last LsAgent Scan] Desc,
[Asset Name]
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2021 06:27 PM
Perfect, thank you!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2021 06:17 PM
This should work.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As [Asset Name],
tblLsAgentGroup.Name As [LsAgent Group],
tblAssets.LastLsAgent As [Last LsAgent Scan],
tblAssets.LsAgentVersion,
tblLsAgentAssetState.statename As Status,
tblAssets.Domain,
tblAssets.Username,
tblAssets.IPAddress As [Last known IP],
tsysOS.OSname As OS,
tblAssets.SP As [Service Pack],
tblAssets.Description
From tblAssets
Inner Join tblLsAgentAsset On tblLsAgentAsset.AssetID = tblAssets.AssetID
Inner Join tblLsAgentAssetState On tblLsAgentAssetState.id =
tblLsAgentAsset.Status
Inner Join tblLsAgentGroup On tblLsAgentGroup.LsAgentGroupID =
tblLsAgentAsset.LsAgentGroupID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join lansweeperdb.dbo.tblAssetCustom On tblAssets.AssetID =
tblAssetCustom.AssetID
Where tblAssets.LastLsAgent < GetDate() - 7 And tblAssetCustom.State = 1
Order By [Last LsAgent Scan] Desc,
[Asset Name]