Reporting Systems that use KMS
I was helping a customer resolve an issue with their KMS server recently and we decided that we'd like to get a look at which systems were actually using it, instead of just looking at the total number of systems as displayed by slmgr /dlv. I couldn't find any slmgr switches that looked like they'd generate a report with this data, but my customer pointed out that we could find it in the event logs (under the Key Management Service grouping), but that it'd be a pain to go through all of the events and pull out the client names. Well, you can probably guess where this is going - I put together a quick script to do exactly that!
This is a really quick and dirty script; I built it to run on the KMS server and generate a table with the client ID in one column and a list of client computer names in the other. Why is it a list of client computer names? Well, this particular customer is running a VDI environment and there can be a bit of a problem with KMS and Instant Clone VDI VMs. When using QuickPrep as part of the Instant clone process, the KMS ID doesn't get changed... so a small shop's KMS server might not get enough unique clients to cross the license activation threshold. Setting the table to collapse all of those identical IDs onto a single line made it nice and easy to see how many unique clients we had hitting the server, which made it easier to understand where we were in relation to our license threshold and to figure out which servers in the environment might be using MAK instead of KMS (since they weren't on the list).
Well, anyway, here's the script that I put together! As always, this script is delivered as-is with no guarantee that it'll work for you. Always make sure that you understand any script that you find on the internet before you run it and test it in a safe environment first!
Check out the script on Github!
Do you have a link to the script? It is not here?
ReplyDeleteIt looks like Gist-it is having problems. The script is at https://github.com/NamedJason/Scripts/blob/master/PowerShell/Get-KMSClients.ps1
Delete