‎06-28-2019 10:03 AM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tsysASServers.Servicelastpolled,
tsysOS.OSname As OS,
tblAssets.SP,
tsysASServers.Version as [SS Version],
Case
When NETVersion.Value = '378389' Then '.NET 4.5'
When NETVersion.Value = '378675' Then '.NET 4.5.1'
When NETVersion.Value = '378758' Then '.NET 4.5.1'
When NETVersion.Value = '379893' Then '.NET 4.5.2'
When NETVersion.Value = '393295' Then '.NET 4.6'
When NETVersion.Value = '393297' Then '.NET 4.6'
When NETVersion.Value = '394254' Then '.NET 4.6.1'
When NETVersion.Value = '394271' Then '.NET 4.6.1'
When NETVersion.Value = '394802' Then '.NET 4.6.2'
When NETVersion.Value = '394806' Then '.NET 4.6.2'
When NETVersion.Value = '460798' Then '.NET 4.7'
When NETVersion.Value = '460805' Then '.NET 4.7'
When NETVersion.Value = '461308' Then '.NET 4.7.1'
When NETVersion.Value = '461310' Then '.NET 4.7.1'
When NETVersion.Value = '461808' Then '.NET 4.7.2'
When NETVersion.Value = '461814' Then '.NET 4.7.2'
When NETVersion.Value = '528040' Then '.NET 4.8'
When NETVersion.Value = '528049' Then '.NET 4.8'
Else 'Older Version'
End As [.NET Version],
cnt.cnt_assets As 'Managed Assets',
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Lasttried,
Case
When NETVersion.Value = '378389' Then '#ffadad'
When NETVersion.Value = '378675' Then '#ffadad'
When NETVersion.Value = '378758' Then '#ffadad'
When NETVersion.Value = '379893' Then '#ffadad'
When NETVersion.Value = '393295' Then '#d4f4be'
When NETVersion.Value = '393297' Then '#d4f4be'
When NETVersion.Value = '394254' Then '#d4f4be'
When NETVersion.Value = '394271' Then '#d4f4be'
When NETVersion.Value = '394802' Then '#d4f4be'
When NETVersion.Value = '394806' Then '#d4f4be'
When NETVersion.Value = '460798' Then '#d4f4be'
When NETVersion.Value = '460805' Then '#d4f4be'
When NETVersion.Value = '461308' Then '#d4f4be'
When NETVersion.Value = '461310' Then '#d4f4be'
When NETVersion.Value = '461808' Then '#d4f4be'
When NETVersion.Value = '461814' Then '#d4f4be'
When NETVersion.Value = '528040' Then '#d4f4be'
When NETVersion.Value = '528049' Then '#d4f4be'
Else '#ffadad'
End As backgroundcolor
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tsysASServers On tsysASServers.Servername = tblAssets.AssetName
Left Join (Select tblRegistry.Value,
tblRegistry.AssetID
From tblRegistry
Where tblRegistry.Valuename = 'Release') NETVersion On
tblAssets.AssetID = NETVersion.AssetID
Join (Select tblAssets.Scanserver,
Count(tblAssets.Scanserver) As cnt_assets
From tblAssets
Group By tblAssets.Scanserver) cnt On tblAssets.AssetName = cnt.Scanserver
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName
‎07-02-2019 02:01 PM
‎07-02-2019 09:09 AM
‎07-01-2019 04:21 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now