PDQ Query to get Windows License Type
AnsweredI 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!
-
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:
Group by the ProductKeyChannel field to see which values are present:
The meaning of the values for LicenseStatus are in this forum post.
-
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.
-
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.
Please sign in to leave a comment.
Comments
9 comments