1

I'm the sole programmer at company. Not only that, I'm the sole person who's remotely computer literate above the "I can check my email". As such, I've been asked to go to all the machines, and determine if any of the computers have duplicate install keys (the theory is the guy before me just didn't care and randomly used whatever key he pulled). Is there a way to determine this without installing any additional software?

12
  • How were they deployed? Via imaging or using install discs? If discs, where are they? If not, are you sure it wasn't a volume license? Do you have any credentials for microsoft.com/licensing/servicecenter/default.aspx ? Check any and all contracts or software documentation you have. Aug 2, 2013 at 17:02
  • I will throw a link in and wait for your response if this is worth a long answer :D. The basic idea is to use Powershell to query Windows keys even from remote machines, get it into an Excel sheet and use a function to search duplicates
    – nixda
    Aug 2, 2013 at 17:06
  • @Raystafarian: They were done using install discs. I have all the discs, and keys, just no notion of where they go, as I wasn't the one who installed it, and the other guy didn't keep track.
    – PiousVenom
    Aug 2, 2013 at 17:09
  • 2
    Depending on how many computers you manage, it may be worth looking at getting a Volume License Agreement so that you don't have to worry about tracking individual keys and licenses. Last time I checked, you could get a VLK for as few as 5 computers.
    – nhinkle
    Aug 2, 2013 at 17:30
  • 1
    Agreed, VLK is much easier to manage, even if a machine fails, you can call and explain that you can't recover the key and they'll add usages on. Plus you build a relationship with MS. Sometimes you can get into programs where you get free stuff by having the VLK Aug 2, 2013 at 18:00

3 Answers 3

1

Try and download Nirsoft's Produkey software. Install on USB key. Walk around, run it and send output to a file on the key. Doesn't require full installation - runs standalone. Shows OS key and Office key. May show other keys as well.

1

With Nirsoft's Produkey, you can retrieve all keys from computers on the network if you have local administrator rights on each or domain administrator rights with the command line flags /remoteall or /remotealldomain domain.com

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

0

Summary

The idea is to use PowerShell to query the license keys of list of PC names (input.csv).

The script will also check for duplicate keys and write the PC-Name, its corresponding license key and the duplicate check result to a new CSV (output.csv).

How to use

  1. Create a CSV list as input. Write just one PC name per line. Save it as Input.csv
    In my example I query my own PC four times.
    enter image description here

  2. Download two PowerShell scripts to the same location as your input CSV

    Get-ProductKey.ps1 contains a single function to get product keys of local and remote systems and can be downloaded from Microsoft's script center.

    Write-ProductKeyList.ps1 will use the input CSV and the function script to write a new output CSV containing the results. Download it from Github or use the code below.

    . .\Get-ProductKey.ps1
    $InputCSV = import-csv .\Input.csv -Header Name
    $OutputCSV = @()  
    $Keys =@()
    
    foreach ($PC in $InputCSV)  
    {   
        $objResult = Get-ProductKey -Computername $PC.name                    
        $checkResult = $Keys -contains $objResult.ProductKey      
        $Keys += $objResult.ProductKey             
        $objResult | Add-Member -type NoteProperty -name Duplicate -value $checkResult          
        $OutputCSV = $OutputCSV + $objResult        
    }         
    $OutputCSV | Select-object Computername,OSDescription,ProductKey,Duplicate | export-csv -path .\Output.csv -noType
    
  3. If you have all three files with the exact names at the same location, you're ready to go.
    Run the Write-ProductKeyList.ps1 script via right-click and Run with Powershell

Result (output.csv)

You will get a CSV file at the same location which you can open with Excel. The first occurrence of any license key will be marked with False, meaning there is yet no duplicate. Of course, all further (duplicate) keys will be marked as True meaning "Yes, this key was already used somewhere" enter image description here

Preliminaries

  • remote Windows machines must be reachable via network (obviously)
  • "Remote Registry" service must be running on every remote machine (by default its on)
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .