Partager via


IssuancePolicy.TemporaryCertificateValidityPeriodInMinutes property

The TemporaryCertificateValidityPeriodInMinutes property specifies or retrieves the validity period for a temporary rights account certificate.

Syntax

IssuancePolicy.TemporaryCertificateValidityPeriodInMinutes

Property value

This property sets or returns an integer value that contains the validity period, in minutes.

Examples

DIM config_manager
DIM admin_role

' *******************************************************************
' Create and initialize a ConfigurationManager object.

SUB InitObject()

  CALL WScript.Echo( "Create ConfigurationManager object...")
  SET config_manager = CreateObject _
    ("Microsoft.RightsManagementServices.Admin.ConfigurationManager")      
  CheckError()
    
  CALL WScript.Echo( "Initialize...")
  admin_role=config_manager.Initialize(false,"localhost",80,"","","")
  CheckError()

END SUB

' *******************************************************************
' Define a rights account certificate (RAC) issuance policy.

SUB SetIssuancePolicy()

  DIM issuePolicy

  ' Retrieve the IssuancePolicy object.
  SET issuePolicy = config_manager.Enterprise.IssuancePolicy
  CheckError()

  ' Set the validity period on the standard RAC to 120 days.
  issuePolicy.StandardCertificateValidityPeriodInDays = 120

  ' Set the validity period on the temporary RAC to 60 minutes.
  issuePolicy.TemporaryCertificateValidityPeriodInMinutes = 60

END SUB

' *******************************************************************
' Error checking function.

FUNCTION CheckError()
  CheckError = Err.number
  IF Err.number <> 0 THEN
    CALL WScript.Echo( vbTab & "*****Error Number: " _
                       & Err.number _
                       & " Desc:" _
                       & Err.Description _
                       & "*****")
    WScript.StdErr.Write(Err.Description)
    WScript.Quit( Err.number )
  END IF
END FUNCTION

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008
Assembly
Microsoft.RightsManagementServices.Admin.dll

See also

IssuancePolicy