05-07-2019 04:28 PM
01-11-2023 02:50 PM
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:
01-11-2024 12:01 PM - edited 01-11-2024 12:09 PM
Sorry i see now I need to deploy the powershell below first. Thanks!
Hi Hendrik_VE,
Can I ask what registry keys you scanned to create that report? I am looking for something very similar.
thank you for any help
Graham
01-10-2023 03:48 PM
You can deploy this powershell script and read the license activation status from the scanned registry keys:
#check if powershell is in admin mode or attempt to swith to admin mode
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
$descr = Get-CimInstance SoftwareLicensingProduct -Filter "partialproductkey is not null" | ? name -like windows* | select-object Description
$licstatus = Get-CimInstance SoftwareLicensingProduct -Filter "partialproductkey is not null" | ? name -like windows* | select-object LicenseStatus
reg add "HKLM\SOFTWARE\LICINFO\License" /f /v Description /t REG_SZ /d $descr.Description
reg add "HKLM\SOFTWARE\LICINFO\License" /f /v LicenseStatus /t REG_SZ /d $licstatus.LicenseStatus
Under Scanning - File & Registry Scanning you have to add these keys to be scanned of course.
01-09-2023 02:46 PM - edited 01-11-2023 09:35 AM
I guess your prayers have been answered. In modern builds of Windows 10, you can get information about activating Windows from the Settings app. In Windows 10 and Windows Server 2022/2019, go to Settings then Update & Security and then Activation. Or, you can run the ms-settings:activation command for quick access to the desired section of ms-settings. There are many forums now capable of telling you where to get and how to activate reddit windows key correctly. This is a great help for novice users. Thanks to those who share their knowledge on such forums.
05-09-2019 02:05 AM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now