Page 1 of 1

[SOLVED] WAPT console, checking if Windows is activated

Published: January 8, 2026 - 11:39 AM
by skoizer
Hello,
Version: 2.6.1.17472
Enterprise License
. I have Windows servers that don't seem to have their licenses activated.
Is there a way to list this using the WAPT console?
In WMI and hardware inventory, I can't find any objects that seem to match
{{ host_info.windows_product_infos.key_match }} --> always true even if it's not activated.

Any ideas if this is possible?

Re: WAPT console, checking if Windows is activated

Published: January 8, 2026 - 4:41 PM
by dcardon
Hello Skoiser and Happy New Year 2026!

You can retrieve it via auditing with something like this (note: I haven't covered possible error cases):

Code: Select all

import json

def audit():
    data = run_powershell('Get-CimInstance SoftwareLicensingProduct -Filter "partialproductkey is not null" | ? name -like windows* | select Description, LicenseStatus | ConvertTo-Json')
    json_data = json.loads(data)
    if int(json_data['LicenseStatus'])==1:
        return 'OK'
    else:
        return 'WARNING'
Sincerely,

Denis