XenApp server role license information must be specified before a XenApp server can accept the user connection. If its not specified then servers will show the output from a Qfarm /load command prompt on a XenApp 6 or 6.5 server indicates a server load of 20000.
HOW DO WE APPLY LICENSING -
NOW THE MAIN PART OF THIS POST -
We as a administrator of FARM often receive the request from our manager that they want to know the peak usage of farm and licenses so, in order to achieve this goal there are couple of options -
2. Monitor with the help of Powershell. I preferred powershell because i find it easy and Edge-sight is not required in this case so, i googled around and created simple script which is basically going to fetch the details with the help WMI and send the email alerts as per your requirement that you can set in the task scheduler. PFB script and mail me in case of any issue or any improvements that you did in the script -
#Region Settings
#Your License Server
$CitrixLicenseServer = “Server Name”
#Do you want to report on licenses with 0 users?
$ShowUnusedLicenses = $true
#Toggle an alert above this percentage of licenses used
$UsageAlertThreshold = 0
#EndRegion Settings
#Region CollectData
#retrieve license information from the license server
$LicenseData = Get-WmiObject -class “Citrix_GT_License_Pool” -namespace “ROOT\CitrixLicensing” -ComputerName $CitrixLicenseServer
$usageReport = @()
$LicenseData | select-object pld -unique | foreach {
$CurrentLicenseInfo = “” | Select-Object License, Count, Usage, pctUsed, Alert
$CurrentLicenseInfo.License = $_.pld
$CurrentLicenseInfo.Count = ($LicenseData | where-object {$_.PLD -eq $CurrentLicenseInfo.License } | measure-object -property Count -sum).sum
$CurrentLicenseInfo.Usage = ($LicenseData | where-object {$_.PLD -eq $CurrentLicenseInfo.License } | measure-object -property InUseCount -sum).sum
$CurrentLicenseInfo.pctUsed = [Math]::Round($CurrentLicenseInfo.Usage / $CurrentLicenseInfo.Count * 100,2)
$CurrentLicenseInfo.Alert = ($CurrentLicenseInfo.pctUsed -gt $UsageAlertThreshold)
if ($ShowUnusedLicenses -and $CurrentLicenseInfo.Usage -eq 0) {
$usageReport += $CurrentLicenseInfo
} elseif ($CurrentLicenseInfo.Usage -ne 0) {
$usageReport += $CurrentLicenseInfo
}
}
#EndRegion CollectData
$usageReport |Select-Object @{name=’Date-time';Expression={Get-Date} },License,Count,Usage,PctUsed,Alert|ft -AutoSize|Out-File -Append C:\report_do_not_delete\$(get-date -uformat “%Y-%m-%d”).txt
#$usageReport | Format-Table -AutoSize | out-file “C:\reports\usagereport.txt”
#mail
Send-MailMessage -From “No-Reply@sample.com” -To “email address” -Subject “Citrix XenApp license usage – Daily Report” -Body “Citrix XenApp license usage – Daily Report” -SmtpServer “smtp.sample.com” -Attachments “C:\report_do_not_delete\$(get-date -uformat “%Y-%m-%d”).txt”
My next post will be on XenApp Powershell SDK so, stay tuned and enjoy the power of powershell.