cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mister_Nobody
Honored Sweeper II

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