‎06-02-2022 02:04 AM
‎06-06-2022 09:14 PM
‎06-03-2022 09:31 PM
‎06-03-2022 05:54 PM
‎06-02-2022 04:40 PM
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
Software.softwareName As Software,
Software.softwareVersion As Version,
Software.SoftwarePublisher As Publisher,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Lasttried
From
tblComputersystem
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblDomainroles On tblDomainroles.Domainrole = tblComputersystem.Domainrole
LEFT JOIN (SELECT
tblSoftware.AssetID,
tblSoftware.SoftwareVersion,
tblSoftwareUni.SoftwareName,
tblSoftwareUni.SoftwarePublisher
FROM
tblSoftware
INNER JOIN tblSoftwareUni ON tblSoftwareUni.SoftID = tblSoftware.SoftID
WHERE
tblSoftwareUni.SoftwareName LIKE '%FlexNetInventroyAgent 2%') AS Software ON Software.AssetID = tblAssets.AssetID
Where
tblAssetCustom.State = 1
--AND tblState.Statename = 'Active' -- redundant
And tblDomainroles.Domainrolename In ('Stand-alone server', 'Member server', 'Primary domain controller', 'Backup domain controller')
And tblComputersystem.SystemType Like 'x64%'
Order By
tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now