The company I work for has a fairly big domain of Windows Desktops and Servers. We also have standalone servers that are remote to our site but we have direct access to.

We need to audit our license usage across all Windows machines (including some VMs). I have tried a few products downloaded, but the key returned is not the one used during installation. I have one product that gives the last 5 characters correctly but needs to be installed so its not really suitable.

I also have tried some PowerShell scripts one of which is here

Ideally I am looking for one that can be used over a network and if possible can audit Office keys too.

I've just tried Jelly Bean and some other product key tools that all return BBBBB-BBBBB-BBBBB-BBBB-BBBBB as the product key.

  • What is wrong with the powershell script that yoou linked? – EBGreen May 29 '14 at 14:47
  • For something like this you might be better served by finding an open source key recovery tool with a command line interface, which would allow you to automate its use with PowerShell. – Tim Ferrill May 29 '14 at 20:13
  • @EBGreen it gives the incorrect product key. – neildeadman May 30 '14 at 7:35
  • @TimFerrill don't suppose you know of anything that actually works? – neildeadman May 30 '14 at 7:35
  • @neildeadman it looks like Magical Jelly Bean Keyfinder supports command line usage. It doesn't support scanning remote network computers, but I've been able to get around that in the past with PSEXEC. Basically you would write a script that would use PSEXEC to run Keyfinder remotely, exporting a CSV to the remote system. Then you just need to grab the CSV remotely and retrieve your data from that. – Tim Ferrill May 30 '14 at 13:49

I think this will work for your purposes using PSEXEC and Magic Jelly Bean KeyFinder.

First we define the folder containing the two executable files, the computer name(s) to target, and set the current location.

$exePath = "$env:USERPROFILE\Downloads\PowerShell"
$computerName = "somecomputer"
Set-Location $exePath

Then we run KeyFinder on the remote computer using PSEXEC

.\PsExec.exe \\$computerName -c .\keyfinder.exe /savecsv "C:\Users\Public\" -s -accepteula

Then we should be able to import the CSV file that we created and gather the key data from that.

$keyData = Import-CSV "\\$computerName\c$\Users\Public\$computerName.csv"

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.