Citrix License Info (using WMI)
I had several questions about this so I decided I should figure it out and Post. It was surprisingly simple. All I needed was the WMI provider and from there it was cake. If you’re curious how I figured out the WMI namespace I used WMI Explorer from MoW [CLICK HERE To Read about it].
The Output will look like this

Here is the Code
# Get-CitrixLicensing
Param($LicenseServer)
$licensePool = gwmi -class "Citrix_GT_License_Pool" -Namespace "ROOT\CitrixLicensing" -comp $LicenseServer
$licensePool | Select-Object @{n="Product";e={$_.PLD}},
@{n="Model";e={"Server"}},
@{n="Type";e={$_.LicenseType}},
@{n="Installed";e={$_.Count}},
@{n="In Use";e={$_.InUseCount}},
@{n="Available";e={$_.PooledAvailable}},
@{n="% in use";e={($_.InUseCount/$_.Count)*100}}
Param($LicenseServer)
$licensePool = gwmi -class "Citrix_GT_License_Pool" -Namespace "ROOT\CitrixLicensing" -comp $LicenseServer
$licensePool | Select-Object @{n="Product";e={$_.PLD}},
@{n="Model";e={"Server"}},
@{n="Type";e={$_.LicenseType}},
@{n="Installed";e={$_.Count}},
@{n="In Use";e={$_.InUseCount}},
@{n="Available";e={$_.PooledAvailable}},
@{n="% in use";e={($_.InUseCount/$_.Count)*100}}
5 Responses to “Citrix License Info (using WMI)”
Leave a Reply
You must be logged in to post a comment.


Great script Brandon. Just what I needed. Will you please explain the second part of the script in how you use Select-Object to display the data? How does Select-Object know to grab each “Product” etc and group them together to display?
I used what is referred to as a calculated property. Effectively, you use select-object to “add” a property that doesn’t really exist, but its value is calculated from a script block “{…}.” Here are some good links that talk about calculated properties.
http://bsonposh.com/archives/260
http://bsonposh.com/archives/262
and
http://www.microsoft.com/technet/scriptcenter/resources/pstips/apr08/pstip0425.mspx
I use this ps1 and get the following result:
PS D:\> .\Get-CitrixLicense.ps1 127.0.0.1
Product : MPS_ENT_ENABLER
Model : Server
Type : Retail
Installed : 10
In Use : 0
Available : 10
% in use : 0
Product : MPS_ENT_CCU
Model : Server
Type : Retail
Installed : 10
In Use : 0
Available : 10
% in use : 0
Would you please explain what is the meaning of “Product” and “Type” which are different from your type, thanks in advance.
only see
LicenseType :
License type – NFR(Not For Resale), Retail, Eval(Evaluation), and TP(Technology Preview)á
sorry, i see the answer.