ExpiryDate
Gets the date a specific license key is set to expire.
Syntax
DateTime ExpiryDate {get;}
Property value
The date on which a specified license key expires.
Discussion
If a license key is defined as an evaluation license, it includes a timestamp that determines when the license will expire. You can use this property to retrieve this expiration date.
Example
The following code sample illustrates using ExpiryDate
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
‘Display the expiration for eval licenses
set objKeys = objLic.keys
i = 0
do while i \< objKeys.Count
set objKey = objKeys(0)
if objKey.isEval then
wScript.Echo "-- [Eval] ", objKey.ExpiryDate
end if
i = i + 1
loop
next
wScript.Echo ""
next
...