cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RayHeathTSS
Engaged Sweeper II
This has been asked for many times. Looks like about 7 years? Is this feature EVER going to be added. It would be REALLY nice to be able to scan activation Status on all of our domain systems.
5 REPLIES 5
Hendrik_VE
Champion Sweeper III

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

 

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

Hendrik_VE
Champion Sweeper III

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.

 

 

EricStewart
Engaged Sweeper

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.

CyberCitizen
Honored Sweeper
Not pretty but you could use this
http://www.lansweeper.com/forum/yaf_postst17406_Get-windows-bios-key.aspx#post58336

Then search the text files for those that are not activated, or combine into a file etc.

Not pretty but you could still get the data.