Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Product Key Report

How can I create a report to show the Computer name plus application and Product Keys?

0

Comments

16 comments
Date Votes
  • Corey,

    That's an excellent question.  Unfortunately there isn't yet a great answer.  The problem is that there isn't a 1 to 1 correspondence between Applications and Product Keys which makes it tough to join them together.  We have some plans to help with this in the future, but for now you'll need to create an SQL report to get what you want.  As long as you're very specific about what you're looking for you can get pretty close.  Here's an example SQL which will give you Office 2010 and 2013 with their product keys.  You may see some keys duplicated because there are so many Office editions and add-ons that can clutter up the results.

    Copy and paste the SQL to a new SQL report, or import the attached file. Let me know what you're missing and I can help you get the right query.

    select
    Computers.Name as "Computer Name",
    Applications.Name,
    ProductKeys.Key
    from Computers
    join Applications using (ComputerId)
    join ProductKeys using (ComputerId)
    where <ComputerFilter>
    and Applications.Name like '%Microsoft%Office%2013%'
    and ProductKeys.Vendor = 'Microsoft'
    and ProductKeys.Product = 'Office'
    and ProductKeys.Version = '2013'
    union
    select
    Computers.Name as "Computer Name",
    Applications.Name,
    ProductKeys.Key
    from Computers
    join Applications using (ComputerId)
    join ProductKeys using (ComputerId)
    where <ComputerFilter>
    and Applications.Name like '%Microsoft%Office%2010%'
    and ProductKeys.Vendor = 'Microsoft'
    and ProductKeys.Product = 'Office'
    and ProductKeys.Version = '2010'
    0
  • Thanks Adam. that worked great. I was able to add Computers.ADDescription to the report to pull in the user of the computer as well.

    0
  • This works GREAT! I'm working on manually populating product keys, including the windows OS Product key, and need to add it to this report. How would I go about doing that?

    0
  • i'm new to all this and only do a little SQL...  is <computerfilter> a placeholder where one is supposed to enter some other value?  i tried to run that report and it came up with no results though there were 5 computers in my "all computers" section and i selected that as the context(my word for it) for the report.

    0
  • Hi Anthony,

    Yes, the <computerfilter> value is literal. When it is used in a WHERE clause it honors the Collection Source selected. If your collection source was set to All Computers and it returned no computers then I would start troubleshooting the query contents. 

    To sum up if you don't use the <computerfilter> flag then the query would always run against All Computers.

    1
  • i thought that might be the case but, before i posted that first question, i had already tried running it by simply removing the '<computerfilter> and' portion of the query so the first parameter after the WHERE would be Applications.Name.  And yet, still no results.  Maybe i'm not correctly selecting the collection source.
    <edit>...  BTW, thanks so much for the fast reply!

    0
  • Just an FYI. The ProductKeys feature was deprecated. Do you have data in there at all? We no longer grab this data. 

    0
  • Hi,

    What's the good solution to retrieve the key?

    Thanks.

    Christophe

    0
  • I believe our current recommendation is ProduKey.

    0
  • Hmmm ... I think there's something than I don't understand.

    I made this query to retrieve the Office 2016 keys :

    select
    Computers.Name as "Computer Name",
    Applications.Name,
    ProductKeys.Key
    from Computers
    join Applications using (ComputerId)
    join ProductKeys using (ComputerId)
    where <ComputerFilter>
    and Applications.Name like '%Microsoft%Office%2016%'
    and ProductKeys.Vendor = 'Microsoft'
    and ProductKeys.Product = 'Office'
    and ProductKeys.Version = '2016'

    Unfortunately, I don't get the expected result.

    What am I doing wrong?

    Thanks for your help.

    0
  • Use ProduKey:

    https://www.nirsoft.net/utils/product_cd_key_viewer.html

    Run ProduKey with a line like this:

    Office:

    ProduKey.exe /IEKeys 0 /OfficeKeys 1 /WindowsKeys 0 /scomma "\\path_to_file\Office\%computername%.txt" /sort 2 /sort ~1

    Windows:

    ProduKey.exe /IEKeys 0 /OfficeKeys 0 /WindowsKeys 1 /scomma "\\path_to_file\Windows\%computername%.txt" /sort 2 /sort ~1

    At the end you have a txt files matching you pc name an the keys inside
    Now you can copy/paste the keys into Inventory

    (Yes i'm sad too because PDQ doens't grab the keys anymore, this feature is lost somewhere between Inventory Version 8 and 9)

    Hint:
    If you upgraded free from Win 7/8 to 10, all Windows keys are the same:
    VK7JG-NPHTM-C97JM-9MPGT-3V66T

    As long as you didn´t erased the PC  you can find the old original Win 7/8 key in the registry with ShowKeyPlus:

    https://github.com/Superfly-Inc/ShowKeyPlus

    And here the cmd line:

    ShowKeyPlus.exe "\\path_to_file\UpgradeKeys\%computername%.txt"

    Again, at the end you have a txt file matching you pc name an the key inside

    Greetings

    0
  • Thanks for your help, I'll try your solution :-)

    Could I also retrieve the Office 2016 key? As I read, it was limited to 2013 ...

    Kind regards,

    Christophe

    0
  • Yes Office 2016 keys are found

    Volume License Windows OS keys can be hidden (BBBB-BBBB-BBBB-BBBB-BBBB) or only the last 4 digits are shown

    0
  • Unfortunately, we have several versions of Office 2016 (no only VL) and I'm not able to retrieve the keys, I don't understand why.

    When I type this command on my laptop, the created file is empty

    ProduKey.exe /IEKeys 0 /OfficeKeys 1 /WindowsKeys 0 /scomma mykey.txt  /sort 2 /sort ~1

    Strange ...

    0
  • I only have VL Office 2016 Keys and it's no problem to extract them with the tool.
    Maybe it's a oem/retail/PKC Key problem?

    Double click the exe and look at result in the GUI, if the GUI shows a result the txt file should do it too

    0
  • I tried ProduKey on my laptop and I only can retrieve the Windows features

    Internet Explorer xxxx-xxxx-xxxx-AAOEM
    Windows (BIOS OEM Key)
    Windows 10 Pro xxxx-xxxx-xxxx-AAOEM

    I'm still searching another solution :-)

    0