Created a report based on the regkeys I scanned:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.Image As icon,
tblAssets.Domain,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
Case
When LicstatQuery.Value = 0 Then 'Unlicensed'
When LicstatQuery.Value = 1 Then 'Licensed'
When LicstatQuery.Value = 2 Then 'OOBGrace'
When LicstatQuery.Value = 3 Then 'OOTGrace'
When LicstatQuery.Value = 4 Then 'NonGenuineGrace'
When LicstatQuery.Value = 5 Then 'Notification'
When LicstatQuery.Value = 6 Then 'ExtendedGrace'
Else 'Unknown'
End As 'License Status',
Case
When LicQuery.Value Like '%MAK%' Then 'MAK License'
When LicQuery.Value Like '%OEM%' Then 'OEM License'
When LicQuery.Value Like '%KMS%' Then 'KMS License'
Else 'Unknown/Other'
End As [License Type],
tblSerialnumber.Product,
tblSerialnumber.ProductID,
tblSerialnumber.ProductKey,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Scanserver
From tblAssets
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Left Join (Select tblRegistry.AssetID,
tblRegistry.Regkey,
tblRegistry.Valuename,
tblRegistry.Value,
tblRegistry.Lastchanged
From tblRegistry
Where tblRegistry.Valuename Like '%LicenseStatus%') LicstatQuery
On LicstatQuery.AssetID = tblAssets.AssetID
Left Join (Select tblRegistry.AssetID,
tblRegistry.Regkey,
tblRegistry.Valuename,
tblRegistry.Value,
tblRegistry.Lastchanged
From tblRegistry
Where tblRegistry.Valuename Like '%Description%') LicQuery On
LicQuery.AssetID = tblAssets.AssetID
Left Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tblSerialnumber On tblAssets.AssetID = tblSerialnumber.AssetID
Where tblSerialnumber.Product Like '%Windows%' And tblAssetCustom.State = 1
Group By tblAssets.AssetID,
tblAssets.AssetName,
tsysOS.Image,
tblAssets.Domain,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblSerialnumber.Product,
tblSerialnumber.ProductID,
tblSerialnumber.ProductKey,
tsysOS.OSname,
tblAssets.SP,
tblAssets.Firstseen,
tblAssets.Lastseen,
tblAssets.Scanserver,
LicstatQuery.Value,
LicQuery.Value
Order By tblAssets.AssetName
Example:
![Hendrik_VE_0-1673445041927.png Hendrik_VE_0-1673445041927.png](/t5/image/serverpage/image-id/2347i0618582CD5265794/image-size/medium?v=v2&px=400)