MY VIRTUALIZATION. YOUR VIRTUALIZATION.

Citrix_Logo.png

Powershell script for release all Citrix licences automatically

IssueCitrix XenApp license acquistion error from license acquisition error from “server-name” server: All licenses are currently in use. Please try again later. If this issue persists, contact your system administrator to acquire additional licenses

Solution : Deploy this script to Windows Task Manager for release automatically all Citrix Licence:

# Script Name: UdadminLicenceReset.ps1
# Description: Script to release Citrix licenses
# http://support.citrix.com/proddocs/topic/licensing-1110/lic-admin-cmds-list-deletes-user-device-r.html
#
# Notes:
# 1. This script is scheduled to run thru Windows Task Scheduler
# 2. C:\Program Files (x86)\Citrix\Licensing\LS has been included in the “Path” system variable so udadmin.exe can be called without full path
#=================================================================================================================

#Get Used Licenses
$FilePath = “C:\Temp\Citrix_Licence_Used.txt”
udadmin.exe -list -f “XDT_ENT_UD” | Select-String “XDT_ENT_UD 2014.0927” | out-file $FilePath

#Remove Excess and Get License to Delete
$Licenses = (Select-String -Pattern “XDT” -Path $FilePath ) | ForEach {$_.line -replace ” XDT_ENT_UD 2014.0927 “,”” }

#Use Udadmin to Release Licenses
ForEach ($Lic in $Licenses) {udadmin.exe -f XDT_ENT_UD -user $Lic -delete}

# Restart Licensing Service
$svc = (Get-Service -DisplayName “Système de licences Citrix”)
Restart-Service -InputObject $svc -verbose

#*********************************************************************
#End Of Script
#*********************************************************************
Exit
(Visited 2,908 times, 1 visits today)
Abdoulaye WAGUEPowershell script for release all Citrix licences automatically

Join the conversation