In LANSweeper, there's a
Reports menu. On that menu is an option to
Create new report. (If the program is localized, the phrasing may be different, of course.)
LANSweeper "reports" are SQL queries. If you are unfamiliar with SQL, it's worth spending some time to learn the basics.
When you "Create new report", you always start with a base query. You can build on it or delete it and start your own from scratch.
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where
tblAssetCustom.State = 1
You can use the mouse to select fields to add to the report (e.g.
PurchaseDate from the
tblAssetCustom table) or you can manually edit the query.
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.PurchaseDate,
DateDiff(dd, tblAssetCustom.PurchaseDate, GetDate()) / 365.25 As Age
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where
tblAssetCustom.State = 1
If you only want to see machines older than a specific age, e.g. 4 years, you can add a condition after the WHERE. The base condition
Where
tblAssetCustom.State = 1
says "where the asset is active" (i.e. it has been seen by LANSweeper within the last 90 days).
You can expand that with the age condition.
Where
tblAssetCustom.State = 1
And DateDiff(dd, tblAssetCustom.PurchaseDate, GetDate()) / 365.25 >= 4
If you have assets for which there is no purchase date recorded, you may want to include those too for further examination.
Where
tblAssetCustom.State = 1
And ( tblAssetCustom.PurchaseDate Is Null
OR DateDiff(dd, tblAssetCustom.PurchaseDate, GetDate()) / 365.25 >= 4
)
If you're only interested in seeing your Windows computers, you can add a filter for that to the WHERE clause.
Where
tblAssetCustom.State = 1
And tsysAssetTypes.AssetTypename = 'Windows'
And ( tblAssetCustom.PurchaseDate Is Null
OR DateDiff(dd, tblAssetCustom.PurchaseDate, GetDate()) / 365.25 >= 4
)