Discover Assets in Multiple Scanning Targets
Get an overview of assets that are in multiple scanning targets. Specifically, assets that are scanned by two of the following scanning targets in the last 14 days: Active scanning (AD scanning targets), IP Range Scanning, and LsAgent. Assets that are being scanned by more than one scanning target can be a cause of scanning issues due to incorrect credential mapping. Additionally, you can also increase your efficiency by not scanning assets more than is needed and only using a single target to scan assets unless a specific use case requires otherwise. Using this information you can more accurately pinpoint which assets are being scanned by multiple IP Range targets so you can take action immediately. You can always find more information about any scanning issue you come across in our knowledgebase which has a huge library of articles to help you troubleshoot and resolve issues. To get more info on error handling you can also check out the related Pro Tips blog post.
Assets in Multiple Scanning Targets Lansweeper Classic Query
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.Version, tblAssets.SP, Case When tblErrors.ErrorText Is Not Null Or tblErrors.ErrorText != '' Then 'Scanning Error: ' + tsysasseterrortypes.ErrorMsg Else '' End As ScanningErrors, tblAssets.Lastseen, tblAssets.Lasttried, tblassets.LastActiveScan, tblassets.LastIPScan, tblassets.LastLsAgent From tblAssets 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 Left Join (Select Distinct Top 1000000 tblErrors.AssetID As ID, Max(tblErrors.Teller) As ErrorID From tblErrors Group By tblErrors.AssetID) As ScanningError On tblAssets.AssetID = ScanningError.ID Left Join tblErrors On ScanningError.ErrorID = tblErrors.Teller Left Join tsysasseterrortypes On tsysasseterrortypes.Errortype = tblErrors.ErrorType Where tblState.Statename = 'Active' and ((tblassets.LastActiveScan is not null and tblassets.LastIPScan is not null) or (tblassets.LastIPScan is not null and tblassets.LastLsAgent is not null) or (tblassets.LastLsAgent is not null and tblassets.LastActiveScan is not null)) and ((tblassets.LastActiveScan >= GETDATE()-30 and tblassets.LastIPScan >= GETDATE()-30) or (tblassets.LastIPScan >= GETDATE()-30 and tblassets.LastLsAgent >= GETDATE()-30) or (tblassets.LastLsAgent >= GETDATE()-30 and tblassets.LastActiveScan >= GETDATE()-30)) Order By tblAssets.Domain, tblAssets.AssetName