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

New XenDesktop 4 Licensing Model: Flexibility? Yes, but at what Cost?

It seems the Citrix community had only had one topic recently, albeit one discussed hotly: licensing. Now that Citrix has given in and practically allowed all conceivable license types, everybody is happy?! It seems so, although CCU licenses have doubled in price, as Shawn Bass points out. But is this really the happy ending of a short but wild story? Maybe, maybe not. Let me explain.
Citrix/Terminal Services/Remote Desktop Services

Latest Posts

Scripted WordPress to Hugo Migration

Scripted WordPress to Hugo Migration
After having published in WordPress for almost 20 years, it was time for a change. This site is now rendered by Hugo, a static website generator built for Markdown content hosted in a Git repository. The migration from WordPress (HTML) to Hugo (Markdown) was far from trivial. Since I couldn’t find any tool for the job, I developed my own set of migration scripts that fully automate the migration process. You can find them on GitHub along with extensive documentation.
Website