→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
05-08-2024 09:49 PM
I'm trying to create a report for computers that are missing a specific piece of software but in our environment, we have both domain and non-domain machines so I would like to filter the report to only give me machines that are in the domain. The reason for this is to use the report to automate the deployment of the software.
The report for any computer missing the software I already have but I can't figure out how to filter it to only domain machines.
This is what I have:
Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress As IP,
tblAssets.Lastseen,
tsysAssetTypes.AssetTypename
From tblAssets
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssets.AssetID Not In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where tblSoftwareUni.softwareName Like '%ADSelfService Plus Client%') And
tblAssets.Lastseen <> '' And tsysAssetTypes.AssetTypename Not Like '%Printer%'
Order By tblAssets.AssetName
05-10-2024 07:39 PM
Prob the "tblassets.domain IS NOT NULL". Give this a shot:
SELECT TOP 1000000 tsysAssetTypes.AssetTypeIcon10 AS icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress AS IP,
tblAssets.Lastseen,
tsysAssetTypes.AssetTypename
FROM tblAssets
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
WHERE tblAssets.AssetID NOT IN (
SELECT tblSoftware.AssetID
FROM tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.softID
WHERE tblSoftwareUni.softwareName LIKE '%ADSelfService Plus Client%'
)
AND tblAssets.Lastseen <> ''
AND tsysAssetTypes.AssetTypename NOT LIKE '%Printer%'
AND tblAssets.Domain IS NOT NULL
ORDER BY tblAssets.AssetName;
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now