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!
Comments
Try this modified version of this WMI query:
Now create a Basic Report with that ProductKeyChannel field:

Group by the ProductKeyChannel field to see which values are present:


The meaning of the values for LicenseStatus are in this forum post.
This is exactly what I needed! Thanks Colby!
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
@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.
the only option I have there is License status đŸ˜¦ ?
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.
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.
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 ?
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.