How to release Citrix Licenses

Issue:  When a new user tries to logon to Citrix they receive the error: “Citrix XenApp license acquisition error from server:  All licenses are currently in use.  Please try again later.”
Citrix all Licenses are currently in use

Discovery: To figure out what’s going on we need to check how many licenses are currently in use and confirm that Citrix is actually successfully pulling from your license pool.
1) Open a command prompt on your citrix license server, type cd\ to get to the root of the C drive, then paste the following: cd “Program Files (x86)\Citrix\Licensing\LS”

2) issue the command: LMSTAT -a -c “C:\Program Files (x86)\Citrix\Licensing\MyFiles”
Or you can try it by leaving out the -c and the path.
Citrix LMSTAT -A -CCitrix LMSTAT licenses issuedHere we can see we have 33 licenses issued and 33 licenses in use and are all out of licenses.

3) Lets now look at which users are consuming the licenses:
from the same command prompt window, enter the command: udadmin -list

Citrix UDADMIN -LIST

Resolution:
In this example, Kelly is no longer with the organization and needs to be removed from the list in order to release the Citrix license consumed by Kelly: udadmin -f XDT_ENT_UD -user kelly -delete
Note: replace the service name XDT_ENT_UD with the service name in your list, and kelly with the appropriate user name you want to remove
Citrix UDADMIN -DELETE
Conclusion:
At this point you should now be comfortable with deactivating Citrix licenses, releasing them back into the pool for future use.

6 thoughts on “How to release Citrix Licenses

  1. Mohammed

    When i run udadmin -list i get no users listed whatsoever yet when you go to Citrix AppCenter there are at least 40 users listed …any help would be greatly appreciated- Thanks

    Tried stop/start Citrix Licence Server Service

    Reply
  2. pavan

    Hi All,

    I there any way to release licenses for list of users( by running batch file or scripting).If yes can anyone please share the process.Because i am new to scripting.

    Reply
    1. Chris Harris Post author

      Hi Paven, thanks for your question. I don’t have an automated method via script, however if you do find one please post the solution so others can benefit as well. Thx!

      Reply
      1. pavan

        Hi Chris Harris,

        Finally got the script

        Open “PowerShell ISE” as Admin on license server and paste below script (on White portion of PowerShell console).

        $Lic_Rem = gc “C:\Lic to be Removed.txt”
        cd “C:\Program Files (x86)\Citrix\Licensing\LS”
        foreach($Rem in $Lic_Rem){

        $Rem
        .\udadmin.exe -f XDT_ENT_UD -user $Rem -delete
        }
        Remove-Item “C:\Lic to be Removed.txt”

        2) Create a text file under C Drive and name it as Lic to be Removed.txt . Copy all user id whose licenses you want to remove on the text file and save.
        3) Execute the script (Press F5).

        Reply
  3. Matthew Humphries

    Unable to paste the commands. For step 1 I had t remove the quotation marks to get to the directory and the second stop just returned: “Error getting status: Cannot find the license file. (-1,359:2 “No such file or directory”)

    Reply
    1. Chris Harris Post author

      It appears the command prompt is case sensitive when quotes are used. I fixed the path in step 1 to be the correct capitalization. Regarding step 2 I would recommend you browse to the folder in Windows Explorer: “C:\Program Files (x86)\Citrix\Licensing\MyFiles” and check if there are *.lic files located there. Also from the command prompt you could browse to the MyFiles folder using cd\ commands and once MyFiles is your current folder, run the command “LMSTAT -a”, then it will assume the current path and this eliminates any path’ing issues.

      Reply

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.