07-25-2024 05:50 AM - edited 07-25-2024 06:14 AM
I found interesting issue - when you have removed virtual machines from Hyper-V or vSphere then their assets are still exist.
So I have created report for such assets:
Select Top 1000000 tsysScannedBy.Description,
tblIndirectScan.LastChanged as [Last VM Scan],
tblAssets.AssetName,
tblAssets.Assetid
From tsysScannedBy
Inner Join tblIndirectScan On tsysScannedBy.ScannedById =
tblIndirectScan.ScannedById
Inner Join tblAssets On tblAssets.AssetID = tblIndirectScan.AssetId And
tblAssets.assettype <> 18
Where (tsysScannedBy.Description = 'esxi' And Not Exists(Select 1
From tblVmwareGuest vg Where vg.AssetID = tblAssets.AssetId)) Or
(tsysScannedBy.Description = 'hyperv' And Not Exists(Select 1
From tblHyperVGuest hg Where hg.GuestAssetId = tblAssets.AssetId))
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now