Batch Delete Issued Citrix User/Device Licenses with Udadmin

Udamin.exe is a handy tool for managing Citrix user/device licenses.

To get a list of currently issued licenses run it like this:

C:\Program Files\Citrix\Licensing\LS>udadmin.exe -list
Usage data is 15 minutes old. Next update in 1 minutes.
 
Users:
username1 XDT_PLT_UD 2013.0815
username2 XDT_PLT_UD 2013.0815
 
Devices:
computername1 XDT_PLT_UD 2013.0815
computername2 XDT_PLT_UD 2013.0815

You can delete individual license assignments like this:

udadmin -f FEATURE [-device | -user] NAME -delete

Unfortunately there is no built-in command that deletes all issued licenses. A one-liner batch script adds that missing functionality for device…

for /f "tokens=1,2" %i in ('udadmin -list ^| find /i "_ud"') do @udadmin -f %j -device %i -delete

…and user licenses:

for /f "tokens=1,2" %i in ('udadmin -list ^| find /i "_ud"') do @udadmin -f %j -user %i -delete

If you have both types of licenses, just run both commands one after the other.

Comments

Related Posts

Solved: Citrix Desktop Service Fails to Start, Logs Event 1006

Solved: Citrix Desktop Service Fails to Start, Logs Event 1006
I am sure you all love XenDesktop VDAs that just won’t register. Although this is becoming less and less of a problem I had another case recently. Checking the Obvious When a XenDesktop VDA is unregistered the first thing I do is check if the VM is actually turned on. With that out of the way I turn to the application event log, looking for entries with the source Citrix Desktop Service. This usually tells you what the problem is. Not this time, however. Apparently the Citrix Desktop Service (aka WorkstationAgent) ran into some error during startup. It logged the following event with ID 1006 and stopped:
Citrix/Terminal Services/Remote Desktop Services