How do I revoke assigned per-Device CALs on an RDS License server?

Occasionally you might find yourself in a scenario where per-Device CALs are in use for a RDS server/farm, and those CALs are in short supply (since they are literally assigned per device, and not per user).

Unfortunately, there isn’t a clean way to do this through a GUI, or any simple way for the licenses to roll-over (that would also defeat the purpose of the Microsoft licensing model).  Instead, we’re forced to use WMI to call for the licenses in use, and then issue a revoke method.

One very important note – you can only revoke the number of licenses that exceed 80% of your total license pool.  EG; if you have a 30-CAL license pack installed, and you are currently using 26 of those licenses, the best you can do is revoke: (in use licenses) – (30 x 0.8) = 2 licenses.



Alternatively, if you weren’t particular about removing the oldest assigned licenses first, you could reduce this code down to just 2 lines.  Any licenses in use above the 80% mark would be revoked, otherwise nothing will happen:

Leave a Reply

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