Checking the Expiration Date on Your Certificates

banner art

Previous Next

Checking the Expiration Date on Your Certificates

The Windows Media License Service certificates expire periodically and at different times from each other. To ensure that your certificates are still valid, you can periodically run the following Visual Basic Scripting Edition (VBScript) script, which will tell you the number of days remaining on your certificates. The LicenseGenerator.Get method in the following code is used to retrieve these values. The cert1 expiration date is the same for version 1 and later licenses.

Note   When a certificate expires, the licensing server cannot issue licenses, and an error message is displayed to end users when they attempt to acquire a license from that server.

'-------------------------------------------------------
' This script tells you when your License Service
' certificates will expire.
'-------------------------------------------------------
dim LicenseServer
dim val

set LicenseServer = CreateObject( "LicenseServer.LicenseGenerator" )

call LicenseServer.Get( "cert1_days_to_expiry", val )
wscript.echo "Cert1 (License Signing Certificate) Expires in " & val & " days."

call LicenseServer.Get( "cert2_days_to_expiry", val )
wscript.echo "Cert2 (MS DRM License Server Root Certificate) Expires in " & val & " days."

set LicenseServer = nothing

See Also

Previous Next

© 2007 Microsoft Corporation. All rights reserved.