PDQ Query to get Windows License Type

Answered

Comments

9 comments

  • Colby Bouma

    Try this modified version of this WMI query:

    SELECT LicenseStatus, ProductKeyChannel FROM SoftwareLicensingProduct WHERE Name LIKE '%Windows%' AND PartialProductKey IS NOT NULL
    

    Now create a Basic Report with that ProductKeyChannel field:
    enter image description here

    Group by the ProductKeyChannel field to see which values are present:
    enter image description here
    enter image description here

    The meaning of the values for LicenseStatus are in this forum post.

    0
    Comment actions Permalink
  • khess13

    This is exactly what I needed! Thanks Colby!

    0
    Comment actions Permalink
  • Marcus Scarlett

    hi,

    I am trying to run this and when adding the WMI in the report, the column appears NULL and the error is: basic report is missing tables or columns: WMI (windows licensing status). Unable to find column

    0
    Comment actions Permalink
  • Colby Bouma

    @TudorL

    That's a bug in 16.5.0.0. You have to click the dropdown in the Column field and select ProductKeyChannel. Sorry I didn't mention this before, I'm using the Inventory 17 beta and this is fixed in that version.

    enter image description here

    0
    Comment actions Permalink
  • Marcus Scarlett

    the only option I have there is License status 😦 ?

    0
    Comment actions Permalink
  • Colby Bouma

    Did you use the WMI query from my post or the one from the KB I linked to? ProductKeyChannel will only be present if you used the query from my post.

    0
    Comment actions Permalink
  • Marcus Scarlett

    I am using your query, it works in the WMI explorer and gives me results. After I run the WMI scanner on the machines, although it failed as "WMI invalid query" the report worked. I now have the productchannel option , but running the report gives no information as the scanning failed.

    0
    Comment actions Permalink
  • Marcus Scarlett

    I might just realized something, the query works on my machine (win10) but fails on another machine(win7) and the ProductKeyChannel does not exist. Am I correct in saying that I will need 2 scanners ?

    0
    Comment actions Permalink
  • Colby Bouma

    Yes, unfortunately ProductKeyChannel does not exist in Windows 7. You could do "SELECT *", but it would be slower and take up more space in your database.

    0
    Comment actions Permalink

Please sign in to leave a comment.