→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎11-20-2014 01:34 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblHyperVGuest.Name As Guest,
tblHyperVGuest.Memory,
Case tblHyperVGuest.Enabledstate When 2 Then 'Enabled' When 3 Then 'Disabled'
When 32768 Then 'Paused' When 32769 Then 'Suspended'
When 32770 Then 'Starting' When 32771 Then 'Snapshotting'
When 32773 Then 'Saving' When 32774 Then 'Stopping'
When 32776 Then 'Pausing' When 32777 Then 'Resuming' Else 'Unknown'
End As StateWhenScanned,
Case tblHyperVGuest.Healthstate When 5 Then 'OK' When 20 Then 'major failure'
When 25 Then 'critical failure' Else 'Unknown' End As Healthstate,
tblHyperVGuest.Lastchanged
From tblAssets
Inner Join tblHyperVGuest On tblAssets.AssetID = tblHyperVGuest.AssetID
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
Where tblState.Statename = 'Active'
Order By tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now