→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jnarodowski
Engaged Sweeper
Below is the script I have but it's only showing Windows Servers, nothing else. Any help would be greatlt appreciated:

Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssetCustom.Model,
tblAssets.Lastseen,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssets.IPAddress Like '10.89.8.%' And tblAssetCustom.State = 1 And
tblComputersystem.Domainrole > 1
Order By tblAssets.AssetName
1 REPLY 1
ErikT
Lansweeper Tech Support
Lansweeper Tech Support
Hi jnarodowski,

You can try the below SQL to get all devices and filter it down to your needs.

SELECT TOP 1000000 tsysOS.Image AS icon, 
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
Coalesce(tsysOS.OSname, tblMacOSInfo.SystemVersion, tblLinuxSystem.OSRelease) As OS,
tblAssets.SP AS SP,
tblAssetCustom.Model,
tblAssets.Lastseen,
tblAssetCustom.Manufacturer,
tblAssetCustom.Serialnumber
FROM tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tsysIPLocations ON tsysIPLocations.LocationID = tblAssets.LocationID
INNER JOIN tblState ON tblState.State = tblAssetCustom.State
LEFT JOIN tsysOS ON tsysOS.OScode = tblAssets.OScode
LEFT JOIN tblMacOSInfo ON tblAssets.AssetID = tblMacOSInfo.AssetID
LEFT JOIN tblLinuxSystem ON tblAssets.AssetID = tblLinuxSystem.AssetID
WHERE tblAssets.IPAddress LIKE '10.89.8.%'
AND tblAssetCustom.State = 1
ORDER BY tblAssets.AssetName;