Answered

PDQ Query to get Windows License Type

I need a way to tell if my workstations are licensed either with OEM, Volume/MAK or Retail licenses by building a PDQ query of some sort. I don't believe PDQ gives you this information in the built-in scanner. I know if it is in the registry I can scan for it. So far I've found a few different articles over where these keys are but they don't seem to be accurate.

This article: https://www.itninja.com/question/how-to-trace-windows-licenses-in-different-types-oem-open-license-full-pack-etc kind of states that you should be able to tell from the Pid string which type it is. I don't believe that to be correct though. When I check mine I get a 270 value which the article states is a Volume License. However when I run slmgr -dlv it states it's OEM. Does anyone know of a reliable way to get this information?

Thanks!

0

Comments

9 comments
Date Votes
  • 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
  • This is exactly what I needed! Thanks Colby!

    0
  • 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
  • @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
  • the only option I have there is License status đŸ˜¦ ?

    0
  • 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
  • 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
  • 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
  • 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

Please sign in to leave a comment.

Didn't find what you were looking for?

New post