Audit Windows Server/Desktop Product Key usage - Super User most recent 30 from superuser.com 2018-10-16T13:48:39Z http://asianhospital.com/?id=feeds/question/760249 http://www.creativecommons.org/licenses/by-sa/3.0/rdf http://asianhospital.com/?id=q/760249 0 Audit Windows Server/Desktop Product Key usage neildeadman http://asianhospital.com/?id=users/13011 2014-05-29T14:35:06Z 2014-05-31T02:18:18Z <p>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.</p> <p>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.</p> <p>I also have tried some PowerShell scripts <a href="http://learn-powershell.net/2012/05/04/updating-an-existing-get-productkey-function/" rel="nofollow noreferrer">one of which is here</a></p> <p>Ideally I am looking for one that can be used over a network and if possible can audit Office keys too.</p> <p>I've just tried Jelly Bean and some other product key tools that all return <code>BBBBB-BBBBB-BBBBB-BBBB-BBBBB</code> as the product key.</p> http://asianhospital.com/?id=questions/760249/-/760917#760917 0 Answer by Tim Ferrill for Audit Windows Server/Desktop Product Key usage Tim Ferrill http://asianhospital.com/?id=users/326171 2014-05-31T02:18:18Z 2014-05-31T02:18:18Z <p>I think this will work for your purposes using <a href="http://msdn.microsoft.com/en-us/library/bb897553.aspx" rel="nofollow noreferrer">PSEXEC</a> and <a href="http://www.magicaljellybean.com/keyfinder/" rel="nofollow noreferrer">Magic Jelly Bean KeyFinder</a>.</p> <p>First we define the folder containing the two executable files, the computer name(s) to target, and set the current location.</p> <pre><code>$exePath = "$env:USERPROFILE\Downloads\PowerShell" $computerName = "somecomputer" Set-Location $exePath </code></pre> <p>Then we run KeyFinder on the remote computer using PSEXEC</p> <pre><code>.\PsExec.exe \\$computerName -c .\keyfinder.exe /savecsv "C:\Users\Public\" -s -accepteula </code></pre> <p>Then we should be able to import the CSV file that we created and gather the key data from that.</p> <pre><code>$keyData = Import-CSV "\\$computerName\c$\Users\Public\$computerName.csv" </code></pre>