Remove a terminal server license from a license server

I ran into an issue where a Server 2016 Terminal server license was applied on a license server in error. It was decided that the license had to be split in half, the other half to be applied on a different license server. This should work on all versions of Windows, take a snapshot of the VM before running it and you should be fine.

I could not find a revoke or delete button. From what I found you can only revoke per device licenses and not per user. Here is the Microsoft Article.

Here are the steps to remove a license through WMIC and PowerShell.

Query currently installed Licenses
-Each license will have a KeyPack ID, take note of the one you need to remove. Here is an example, this one has ID of 2, I need to remove my 2016 license that has KeyPackID of 4.

Get-WmiObject Win32_TSLicenseKeyPack

Remove the license with WMIC
-The server 2016 license that i had to remove had a KeyPackID of 4. I ran the below command to delete it.

wmic /namespace:\\root\CIMV2 PATH Win32_TSLicenseKeyPack CALL UninstallLicenseKeyPackWithID 4

This entry was posted in Microsoft and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *