CyberCitizen wrote:
Can you share your SQL / Deployment Report?
Just interested in how you're filtering the registry info.
I have done it with files, registry I am having a look at but always find it helpful to analyse code.
The below lists assets seen in the last hour with a scanned IMEI registry value that is not 15 chars long (expected IMEI length).
We also filter based on OU and model types which I've removed to simplify the report.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
DateDiff(n, tblAssets.Lastseen, GetDate()) As MinutesSinceLastScanned,
tblIMEI.IMEI
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Left Join (Select tblRegistry.AssetID,
tblRegistry.Value As IMEI
From tblRegistry
Where tblRegistry.Valuename Like 'IMEI' And Len(tblRegistry.Value) <>
15) tblIMEI On tblAssets.AssetID = tblIMEI.AssetID
Where tblAssetCustom.State = 1 And
DateDiff(n, tblAssets.Lastseen, GetDate()) < 60
Group By tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen,
DateDiff(n, tblAssets.Lastseen, GetDate()),
tblIMEI.IMEI