Count

Gets the number of licenses provided by a specific license key.

Syntax

int Count {get;}

Property value

The number of licenses provided in a license key.

Discussion

Each license key specifies the number of workstations or servers for which you have purchased licenses. This property indicates the total number of licenses defined for the key. It does not indicate the number currently in use or available to be used.

Example

The following code sample illustrates using the license key Count property in a script:

...
set objCollection cims.LoadLicenses
for each objLics in objCollection
    wscript.echo "Number of licenses:", objLics.Count
    for each objLic in objLics 
        wScript.Echo "License Type:", objLic.Type
        wScript.Echo "Seats:", objLic.Count
        wScript.Echo "Used:", objLic.usedCount
        set objKeys = objLic.keys
        i = 0
        do while i < objKeys.Count 
            set objKey = objKeys(0) 
            if objKey.isEval then 
                wScript.Echo "-- [Eval] ", objKey.ExpiryDate
            else 
                wscript.Echo "--", "Serial #:", objKey.SerialNumber
                wScript.Echo "Seats:", objKey.Count
            end if
            i = i + 1
        loop
    next 
    wScript.Echo "" 
next 
...