→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Daniel_B
Lansweeper Alumni
The report below lists all Hyper-V guest machines.

The report will only list assets that meet all of the following criteria:
  • The asset state is set to "active".
  • The asset is a Hyper-V guest machine.


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
0 REPLIES 0