‎08-10-2021 09:15 PM
‎02-08-2022 11:28 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain As Domain,
tsysAssetTypes.AssetTypename,
Case
When Soft01.AssetID Is Not Null Then 'Installed'
Else 'Not Installed'
End As [Desktop Central Agent],
Case
When Soft02.AssetID Is Not Null Then 'Installed'
Else 'Not Installed'
End As [CrowdStrike Sensor],
Case
When Soft03.AssetID Is Not Null Then 'Installed'
Else 'Not Installed'
End As Zscaler,
Case
When Soft04.AssetID Is Not Null Then 'Installed'
Else 'Not Installed'
End As [TeamViewer Host],
tsysOS.OSname As [OS Name],
tblAssets.Firstseen As [Created Date],
tblAssets.Lastseen As [Last successful scan],
tblAssets.Lasttried As [Last scan attempt]
From tblAssets
Left Join (Select tblSoftware.AssetID
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where
tblSoftwareUni.softwareName Like '%ManageEngine Desktop Central - Agent%')
As Soft01 On Soft01.AssetID = tblAssets.AssetID
Left Join (Select tblSoftware.AssetID
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%CrowdStrike Windows Sensor%') As
Soft02 On Soft02.AssetID = tblAssets.AssetID
Left Join (Select tblSoftware.AssetID
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%Zscaler%') As Soft03 On
Soft03.AssetID = tblAssets.AssetID
Left Join (Select tblSoftware.AssetID
From tblSoftware
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%TeamViewer%Host%') As Soft04 On
Soft04.AssetID = tblAssets.AssetID
Inner Join lansweeperdb.dbo.tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join lansweeperdb.dbo.tsysAssetTypes On tsysAssetTypes.AssetType =
tblAssets.Assettype
Where (Soft01.AssetID Is Null Or Soft02.AssetID Is Null Or
Soft03.AssetID Is Null Or Soft04.AssetID Is Null)
Order By tblAssets.AssetName
‎08-16-2021 05:50 PM
‎08-10-2021 10:34 PM
SELECT TOP 1000000
tblAssets.AssetID,
tblAssets.AssetName,
CASE
WHEN Soft01.AssetID IS NOT NULL
THEN 'Installed'
ELSE 'Not Installed'
END AS [Desktop Central Agent],
CASE
WHEN Soft02.AssetID IS NOT NULL
THEN 'Installed'
ELSE 'Not Installed'
END AS [Duo Agent],
CASE
WHEN Soft03.AssetID IS NOT NULL
THEN 'Installed'
ELSE 'Not Installed'
END AS [Nessus Agent],
CASE
WHEN Soft04.AssetID IS NOT NULL
THEN 'Installed'
ELSE 'Not Installed'
END AS [DefenseStorm Agent],
CASE
WHEN Soft05.AssetID IS NOT NULL
THEN 'Installed'
ELSE 'Not Installed'
END AS [LanSweeper Agent],
CASE
WHEN Soft06.AssetID IS NOT NULL
THEN 'Installed'
ELSE 'Not Installed'
END AS [Sophos Endpoint Agent]
FROM
tblAssets
LEFT JOIN (SELECT tblSoftware.AssetID
FROM tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
WHERE
tblSoftwareUni.softwareName LIKE '%ManageEngine Desktop Central - Agent%') AS Soft01 ON Soft01.AssetID = tblAssets.AssetID
LEFT JOIN (SELECT tblSoftware.AssetID
FROM tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
WHERE
tblSoftwareUni.softwareName LIKE '%Duo Authentication for Windows Logon x64%') AS Soft02 ON Soft02.AssetID = tblAssets.AssetID
LEFT JOIN (SELECT tblSoftware.AssetID
FROM tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
WHERE
tblSoftwareUni.softwareName LIKE '%Nessus Agent (x64)%') AS Soft03 ON Soft03.AssetID = tblAssets.AssetID
LEFT JOIN (SELECT tblSoftware.AssetID
FROM tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
WHERE
tblSoftwareUni.softwareName LIKE '%DefenseStorm%') AS Soft04 ON Soft04.AssetID = tblAssets.AssetID
LEFT JOIN (SELECT tblSoftware.AssetID
FROM tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
WHERE
tblSoftwareUni.softwareName LIKE '%lsagent%') AS Soft05 ON Soft05.AssetID = tblAssets.AssetID
LEFT JOIN (SELECT tblSoftware.AssetID
FROM tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
WHERE
tblSoftwareUni.softwareName LIKE '%Sophos Endpoint Agent%') AS Soft06 ON Soft06.AssetID = tblAssets.AssetID
WHERE
tblAssets.Assettype = -1
AND ( Soft01.AssetID IS NULL
OR Soft02.AssetID IS NULL
OR Soft03.AssetID IS NULL
OR Soft04.AssetID IS NULL
OR Soft05.AssetID IS NULL
OR Soft06.AssetID IS NULL)
ORDER BY
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now